Skip to main content

Sign in

Save your progress and access it from any device.

Or with email

Don't have an account?

Privacy policy

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.

Step 1

Modified / Untracked

The file has been created or modified but is not yet in the staging area. It appears in red in git status.

Step 2

Staged (indexed)

The file has been added with git add. It appears in green and will be included in the next commit.

Step 3

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)

SymbolMeaningExample
ANew file added (staged)A about.html
MModified file M index.html
DDeleted fileD old-page.html
??Untracked file?? temp.log
UUUnresolved merge conflictUU conflicted.html

Part of the Git Basics guide

A

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