I’m using command-line git and Kaleidoscope to perform my code reviews. When I merge a branch into another and type
git difftool
Kaleidoscope only displays changes that are ‘not staged for commit’ and don’t display ‘unmerged paths’ or ‘changed to be committed’.
The command-line displays the rest of the stuff.
Any idea why?
This is the relevant content of my .gitconfig
[difftool "Kaleidoscope"]
cmd = ksdiff-wrapper git \"$LOCAL\" \"$REMOTE\"
[diff]
tool = Kaleidoscope
[difftool]
prompt = false
Short answer: what you want to be typing on the command line is
git difftool HEAD, notgit difftool.Long answer: This is normal git behavior, and it’s kind of frustrating if you don’t realize what’s happening. I’m not sure why the command-line diff is working as you expect, but both
git diffandgit difftoolshould be performing similarly as per the git man page:So
git diffandgit difftoolshould show you only unstaged changes.If you want to see staged changes, you should use
git diff --cachedandgit difftool --cachedinstead:Finally, if you want to see both staged and unstaged changes, you use the third form,
git diff HEADorgit difftool HEAD: