Saying git diff
only shows unstaged changes relative to the index (or HEAD
if the index is empty, alternatively any hash or branch you supplied) but leaves out files you already staged for the next commit.
To diff your added changes with HEAD
, say:
git diff --cached
Effectively, this gives you the changes you will commit when you run git commit
without the -a
switch.
Posted by Arne Hartherz to makandra dev (2012-01-26 14:54)