We are together going to build The Ping App, which takes list of ips in excel, pings them and records the output in another excel.
And while we are building this app we will learn about how git is actually a life time & effort savior.
So let's begin:
To Start with, please download/clone this repo, it has some initial files to start with and some other files I have given seperately and I'll explain why on the session.
- Install python virtual env & activate the same by using following link: python-virtual-env-install-and-activate
- Install dependencies with below command:
pip install -r requirements.txt
-
Create a feature branch for reading data from excel
git checkout -b feature-read-excel
-
Apply
get_ips_excel.patch
git apply patches/get_ips_excel.patch
-
Add and commit the changes
git add excel_util.py && git commit -m "added excel read method"
-
Checkout to master branch
git checkout master
orgit switch master
-
Create a feature branch for writing data to excel
git checkout -b feature-write-excel
-
Apply
write_data_excel.patch
git apply patches/write_data_excel.patch
-
Add and commit the changes
git add excel_util.py && git commit -m "added method to write data to excel"
Merging the changes from two branches
-
Switch to master branch
git checkout master
orgit switch master
-
Merge
feature-read-excel
branchgit merge feature-read-excel
-
Merge
feature-write-excel
branchgit merge feature-write-excel
There will be conflict as both branches did the changes in the same file, resolve them manually or use vscode for the same