Continuing from the last post Let's Learn - Git Branching #1 where we have learned about git branches, how to create and do the parallel development with them.
a. Merge the changes to master: we have completed development with branch "atul" and ready to merge those changes/module with the main branch "master". If there are no changes have been done in master after creating "atul" branch, merging process is quite easy. We will look into this first -
i. Git log of "atul" branch:
==
From the screenshot, we can see that "atul" branch has initiated from "master" branch from below commit point -
master - de70bc2450802c80dc5520afa20b53de30488e5a
atul - 781d0bb325d67ba251e9db3af4d8ef90c246e406
ii. Git log of "master" branch: Let''s quickly check the master log as well
In master branch, last commit where the HEAD is pointing to "de70bc2450802c80dc5520afa20b53de30488e5a" same commit which we can see inside "atul" branch which tells us that there is no changes have been done in master after branching "atul" out.
This kind of merge is simple, as this is just a repoing of HEAD and done. Let's see how we can merge -
==
This command will merge the "atul" branch changes to "master", we can confirm the same from master git log.
Let's quickly make a new change in the master branch and check the git log
after committing the changes (third.txt) to master, git log shows that HEAD point to the latest change
Like the below page to get the update
Facebook Page Facebook Group Twitter Feed Google+ Feed Telegram Group