Short answer: what you want to enter on the command line is git difftool HEAD , not git difftool .
Long answer: this is normal git behavior, and it is frustrating if you do not understand what is going on. I am not sure why the command line diff works as you expect, but both git diff and git difftool should run the same way as on the git page:
git diff [--options] [-] [<path> ...] This form is for viewing the changes you have made to the index (an intermediate area for the next commit). In other words, differences are what you could say git to add to the index, but you still haven't. You can change using git-add (1).
So, git diff and git difftool should only show unstated changes.
If you want to see the changes made, you should use git diff --cached and git difftool --cached instead:
git diff [--options] --cached [<commit>] [-] [<path> ...] This form is for viewing the changes that you made for the next commit with respect to the name <commit>. Typically, you want to compare with the last commit, so if you do not give <commit>, then HEAD is used by default. If HEAD does not exist (for example, unborn branches) and <commit> is not specified, it shows all phased changes. --staged is synonymous with --cached.
Finally, if you want to see both phased and non-stationary changes , you use the third form, git diff HEAD or git difftool HEAD :
git diff [--options] <commit> [-] [<path> ...] This form is designed to view the changes that you have in the working tree regarding the name <& commit ;. GT You can use HEAD to compare with the last commit, or the name of a branch to compare with the tip of another branch.
source share