I\'m reading the book Pro Git, second edition.
It says, on page 21:
git diff --staged
This command compares your staged changes t
The “staging area”, or “cache” are both synonyms for the same thing which has another name in most other contexts in Git: The index.
The index is the area where changes are staged when you add them using git add
(or git rm
). It’s the set of changes that is committed when you do git commit
.
All three names are usually used synonymously, although “cache” is rarely used outside of the --cached
parameter in git diff
.