document updated 11 years ago, on Jan 1, 2013
There are several "areas" (my term) that can store files within a single Git repository.
- HEAD
- index
- working tree
- untracked files
- stash
HEAD
Things that are actually checked in to the repository.
This is the staging area, an intermediate step between the working directory and the repository.
When you do a commit, it commits everything that's in the index.
untracked files
various diffs
- index vs working dir
- HEAD vs index
- HEAD vs working dir
discard changes
- set index to working dir
- opposite of 'add -p' — move things out of staging, selectively
see here!
see also