staging area

Git's list of exactly what the next commit will contain, kept in the file .git/index; also called the index.

In more detail

It holds a complete tree, not just a list of changed names: every tracked path with the ID of the version that will be committed. git add replaces one path in it with the file as it is at that moment, so if you edit the file again the staged copy stays as it was. git commit turns the staging area into the new snapshot.

Example

git ls-files --stage

Related terms

Taught in

References