Check Status
The status command reports what changed. It is the first command to run whenever you wonder where you are.
A new file appears
The file is untracked. Git sees it but does not watch it yet.
$ git statusAfter saving, the tree is clean
A clean tree means every change is saved in a snapshot.
$ git statusExample
$ git statusKey points
- Status shows the branch you are on.
- It shows files Git has never seen.
- It shows files that changed since the last snapshot.
- It shows files that are ready to save.
- It never changes anything. It only reports.
- Run it before every other command until it feels automatic.
- A clean tree means nothing changed since the last snapshot.
Here, status names the branch and the one new file. The words “untracked files” mean Git sees the file but has no snapshot of it yet.
Note
Status output is advice, not a test. Read it slowly.
Try it Yourself
Edit the code, then press Run.
Running is simulated
Exercise
What does git status change?