Using gitk, can I see the difference between 2 commits? Using gitk, can I see the difference between 2 commits? git git

Using gitk, can I see the difference between 2 commits?


In windows at least it is perfectly possible :

enter image description here


Not sure if you actually want a diff or if you want the normal gitk representation but only for the commits leading from sha1 to sha2

In the later case you can provide all the normal revision parameters: https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html

So you can do things like

gitk sha1..sha2

or if master got merged into the sha2 branch and you don't want to see the commits that come from master and sha1, is the first commit branched from master use

gitk master..sha2


Unfortunately, gitk doesn't support diff output in that way. :-( You can use git difftool though. It comes with support for a number of tools builtin. For instance, you could do git difftool -t kdiff3 sha1 sha2. It shows the file diffs one at a time. There was talk on the git list about supporting more than just one file at a time via a diff tool, but I'm not sure where that ended up. I haven't seen a patch implementing it yet.