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 form | What it does |
|---|---|
-s, --short | Compact output, two letters per file |
-b, --branch | Show the branch and its upstream, usually combined with -s |
--porcelain | Stable, script-friendly output that does not change between versions |
-uno | Hide untracked files |
--ignored | Also list files hidden by .gitignore |
Examples
git status
On branch main
Changes not staged for commit:
modified: app.js
git status -sb
## main...origin/main
M app.js
?? notes.txt
git status --porcelain
test -z "$(git status --porcelain)" && echo clean
Notes
- In short output the left letter is the staging area and the right letter is the working folder. ?? means the file is untracked.
- Status only reads. It never changes your files.
- It tells you what to do next, such as which command un-stages a file, so read the hints it prints.
See also
Last reviewed 2026-10-09.