Actually, git diff
is between index and working tree. It just so happens that until you have staged changes to the index (with git add
) that its contents will be identical to the HEAD
commit.
git diff HEAD
is between repo and working tree.
See 365git.tumblr.com post: