My scrapbook about anything which I learned or want to remember, Sometime about tech tips, thoughts and rambling. If you find anything useful don't forget to give thumbs-up :)

Breaking

Saturday, November 24, 2018

Let's Learn - Git Branching #2


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     


Disclaimer

The postings on this site are my own and don't necessarily represent IBM's or other companies positions, strategies or opinions. All content provided on this blog is for informational purposes and knowledge sharing only.
The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of his information.