Create Branches and Merge it with Master
1. Create Branch in Git “git branch branch1”
2. Checkout from Master using “git checkout branch1”
3. Now we are in “branch1”
4. Modify “index.php”
Previous | After Modify |
5. Now check the status using “git status”
6. Add the modified file in git “git add .”
7. Now commit the changes
8. Now navigate to “master” using “git checkout master”
9. Now you can see your modified code no more exists. And it looks like the older version (master)
10. To see your changes again merge your branch with master using “git merge branch1”
11.Now again refresh your browser and we will see the changes of “index.php” are reflecting.
12. To see the all the log we use “git log”
Thank you!