Menu
Coddy logo textTech

Git Status

Last updated

git status shows the state of your working tree: which files are staged for the next commit, which are modified but not staged, and which are untracked. It also tells you what branch you're on and how far ahead or behind its upstream you are. It's the command you run most often to see where things stand.

Try these in the terminal playground - a real shell in your browser, nothing to install.

git status sorts your files into staged (A), modified (M), and untracked (??) before you commit.

Syntax

CommandWhat it does
git statusFull status of the working tree and branch
git status -sShort, compact one-line-per-file format
git status -sbShort format plus the branch line
git status --ignoredAlso show files ignored by .gitignore

Reading the short format

In git status -s, the two columns are staged / unstaged.

MarkerMeaning
MModified
AAdded (staged new file)
DDeleted
??Untracked

Git status FAQ

What does git status show?
It lists the files that are staged for the next commit, files that are modified but not yet staged, and files Git isn't tracking at all (untracked). It also shows your current branch and whether it's ahead of or behind its remote. It changes nothing - it's purely informational.
What's the difference between git status and git status -s?
Plain git status gives a verbose, explanatory listing grouped by state. git status -s (short) prints one compact line per file with two status columns - the left for the staging area, the right for the working tree - which is faster to scan once you know the markers.
How do I read the two columns in git status -s?
The first column is the file's staged status, the second is its unstaged (working-tree) status. For example M means staged-modified, M means modified-but-unstaged, MM means both, and ?? means untracked. A is a newly staged file and D a deletion.
Why doesn't git status show my new file's changes?
A brand-new file shows as untracked (??) - Git isn't tracking it yet, so it reports the whole file as new rather than a diff. Once you git add it, status shows it as staged. Untracked files also won't be included by git commit -a.
Can I practice this online?
Yes. Open the terminal playground to run git status in a real shell in your browser - nothing to install. Coddy's free interactive Git course also covers the everyday Git workflow step by step.
Coddy programming languages illustration

Learn Git with Coddy

GET STARTED