First, one point needs clarification :
In git, when one talks about files in "the staging area" or "the index", they actually refer to :
- the files as they are in the
HEAD commit, - plus the potential
git added modifications.
So the meaning of "there are no modifications in the staging area" is :
"the staging area is the same as HEAD".
With that in mind, you can re-read the diagram posted by VonC :
git diff will display the differences between the worktree and the staging area (the index) ; - when there are no extra modifications staged, "the index" is the same as
HEAD -- as a consequence, git diff will indeed show the difference between HEAD and your worktree ; - the command that will always show you "the difference between
HEAD and your worktree" (and disregard the index) is : git diff HEAD
git diff --cached?git diff --stagedorgit diff --cachedcompare Staging Area with HEAD. It does not compare Working Directory with HEAD.