Skip to content
Justice Tech School

Working Tree, Index and Repository

Files move through three areas: the working tree where you edit, the index (staging area) and the repository of commits.

Example
echo one > a.txt
git status --short
git add a.txt
git status --short
git commit -qm 'first'
git status --short | wc -l

Result

?? a.txt
A  a.txt
0

Exercise

Move to the staging area.

git  a.txt

Quiz Test

Where do commits live?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.