Quantcast
Viewing all articles
Browse latest Browse all 40

Get the difference between two branches in Git

I did following (I simplified this comparing to a reality):

  • created a branch Branch1, switched to it
  • added file File1 and modified existing file File2 and commited this
  • figured out that I don't need File1, removed it and commited this

So, the actual difference between original branch and Branch1 is only modification of File2.

I want to get this actual difference between branches and put in Branch2. Generally speaking, I want to get rid of not necessary history of adding/removing File1.


Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>