19 Jan 2017

Understanding a merge commit - git

This is what I sent today to my colleagues while explaining the reason for mysterious changes in a pull-request
That blank merge commit is the culprit. All changes which should be result of merge are blown away.
Explanation:-
First let's understand that a merge commit is also a commit with changes. Changes in source branch since its diversion (from destination branch) are auto-magically done as part of merge commit in destination branch. 
So a merge occurred without any changes (if its been blown away as it has been the case) in merge commit, is basically a reversal of all changes that have occurred in source branch since the destination branch diverged from it. Hope this clarifies the mystery.
To visualise how chain of commits are formed, diverged and merged, you can refer to the image in Understanding what GIT does under the hood rather than only learning commands and wondering

24 comments:

  1. Thanks for sharing the article, its really useful. Keep updating more with us.

    ReplyDelete
  2. Expert Web Solutions a top leading website designing company in tilak nagar, delhi. we are providing cheapest web designing service company in delhi and all over india. Website designing company in janakpuri. VIEW MORE :- Web Designing Company in India

    ReplyDelete
  3. Awesome blog post thanks for sharing very informative post
    . VIEW MORE :- web designing companies in delhi

    ReplyDelete
  4. I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job
    Shri Ram Packaging Industry is one of the Leading Manufactures & suppliers of International standard pinewood pallets, Euro Pallets, ISPM-15 Heat Treated wooden Pallets, Crates, boxes since last 4 decade in Gurgaon, Bhiwadi.VIEW MORE
    Paper Angle Board Manufacturer in Neemrana

    ReplyDelete
  5. I am grateful for this blog to distribute knowledge about this significant topic. Here I found different segments and now I am going to use these new instructions with new enthusiasm.
    code ส่วนลด Central

    ReplyDelete
  6. Your Blog is so informative.Thanks for sharing important information. Best Website Development Company in Delhi NCR

    ReplyDelete
  7. Your Blog is so informative it helps me a lot to increase my knowledge. Best Digital Marketing services company in Delhi NCR

    ReplyDelete
  8. Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. jobs for blockchain app developers

    ReplyDelete
  9. Fabulous post, you have denoted out some fantastic points, I likewise think this s a very wonderful website. I will visit again for more quality contents and also, recommend this site to all. Thanks. κατασκευη eshop

    ReplyDelete
  10. You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. Website Designing Company

    ReplyDelete
  11. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Digital marketing company

    ReplyDelete
  12. Nice Article..!
    Those who come to read your Information will find lots of helpful and informative tips.
    Website Developers in Pune
    Web Developers in Pune

    ReplyDelete
  13. It’s really a nice and helpful piece of info. I’m happy that you shared this useful information with us. Please keep us informed like this. Thanks for sharing.
    web design and development

    ReplyDelete
  14. Posted blog really impressed me lot here I found tips and new ideas for SEO Content Writing Services India which gave helpful reasons, keep posting new informative blogs with us after all I am your regular blog reader Content writing services Delhi.

    ReplyDelete
  15. It's an impressive blog post where I have found influenced knowledge which helped me lot in my passion check for more information Blog sites thanks for providing blog post with us.

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete