How to compare changesets in Git?

Paul Pladijs picture Paul Pladijs · Feb 17, 2011 · Viewed 9.8k times · Source

Git makes it very easy to compare differences between commits, using for instance the git commands diff and difftool. Also in TortoiseGit you just select two commits to compare them.

But is there a way to compare changesets? In other words: to see the differences between the diffs of one set of commits and the diffs of another set of commits.

This would be very handy to compare (sets of) commits which are cherry-picked or have been rebased.

Answer

Jeff Bradberry picture Jeff Bradberry · Feb 18, 2011

Perhaps diff <(git show rev1) <(git show rev2) will do what you want?