tags:

views:

40

answers:

1

Say I do

git add foo.txt

Now, foo's changes are in the index (I'm assuming git was already tracking that file). Now, when I do git diff, I can't see the changes in foo by doing

git diff

Are there some extra things that git diff wants before it shows me those changes?

+6  A: 

git diff shows unstaged changes. To get the staged/cached changes, you can do git diff --cached. To get both cached and uncached changes, you can do git diff HEAD, which compares the whole working tree to the named commit (HEAD).

Lajnold
ooh. Thanks! Why so many words for 1 concept! Let me see if I got this straight: staged (or cached) changes = changes that live in the index.
allyourcode
That's correct.
Lajnold