Git status: understand the state of your files
git status is the command you run most often. It shows you which files have changed, which are ready to commit, and which are ignored by Git.
The 3 states of a file in Git
Every file goes through these states. git status tells you where each file stands.
Modified / Untracked
The file has been created or modified but is not yet in the staging area. It appears in red in git status.
Staged (indexed)
The file has been added with git add. It appears in green and will be included in the next commit.
Committed
The file is recorded in the history. It no longer appears in git status (unless it is modified again).
Git status in practice
Full output and the short version.
Full output
Short output (-s)
Reading the short output (git status -s)
| Symbol | Meaning | Example |
|---|---|---|
| A | New file added (staged) | A about.html |
| M | Modified file | M index.html |
| D | Deleted file | D old-page.html |
| ?? | Untracked file | ?? temp.log |
| UU | Unresolved merge conflict | UU conflicted.html |
Part of the Git Basics guide
GitQuest is created by Anaïs (nouvelle fenêtre), web developer and head of education, specializing in tech training and digital accessibility.
Questions about git status
Learn to read git status like a pro
GitQuest trains you to understand your repository state in real-world situations.
Start practicing now