Skip to content

git tricks

Elliot Lee edited this page Sep 28, 2023 · 1 revision

Get a git diff (not show merge commits)

Show non-merge differences for two commits in git

I want to see the diff between the two commits, but excluding changes made during merge commits (that is, all commits with more than one parent) that were made between the two commits. (Basically, I want any "real" commit that was made to the branch, excluding the merges.)

git log --no-merges -p --first-parent branch-start..branch-end