3 ms·
If you want the diff caused by bringing a topic branch into master (i.e. its unmerged parts), you can also do git diff master...topic with three dots instea
by majewsky 10y ago
If you want the diff caused by bringing a topic branch into master (i.e. its unmerged parts), you can also do
git diff master...topic
with three dots instead of two.
- gsylvie 10y agoOr in this case (since we're processing merges one at a time to make the calculation): git diff COMMIT^1...COMMIT^2 (aka, parent1...parent2). I find the three-dot diff notation very useful, but confusing, and always have to type "git help diff" first and stare at the docs a bit to find this bit: "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B" Also, I prefer first-parent since it gets the actual change to the mainline, whereas "git diff parent1...parent2" might miss some changes with dirty merges (e.g., conflict resolution). More info here: http://stackoverflow.com/a/41356308/5819286 http://stackoverflow.com/a/41356308/5819286