git status Show what has changed and what is staged

Summarises the state of your working folder: which branch you are on, which files are changed, which are staged for the next commit, and which are not tracked yet. Run it often.

Synopsis

git status [OPTION]...

Common options

Option or formWhat it does
-s, --shortCompact output, two letters per file
-b, --branchShow the branch and its upstream, usually combined with -s
--porcelainStable, script-friendly output that does not change between versions
-unoHide untracked files
--ignoredAlso list files hidden by .gitignore

Examples

See the full picture
git status
On branch main
Changes not staged for commit:
	modified:   app.js
Short form with branch info
git status -sb
## main...origin/main
 M app.js
?? notes.txt
Use in a script
git status --porcelain
Check there is nothing left to commit
test -z "$(git status --porcelain)" && echo clean

Notes

See also

Last reviewed 2026-10-09.