2 ms·
Or 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
by gsylvie 10y ago
Or 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