inspection

git status

Shows the state of the working tree and index: staged, unstaged, and untracked files, plus branch tracking info. The first command to run when you're unsure what changed.

git status [<options>]

Common flags

Flag Purpose
-s / --short Compact one-letter-per-file output
-b / --branch Show branch and tracking info (default on)
--porcelain Machine-readable stable output for scripts
--ignored Also list ignored files
-uno Skip listing untracked files for speed

Examples

git status

Full human-readable status

git status -sb

Short output with branch header

git status --porcelain

Script-friendly output for hooks and CI

Gotcha

Status can be slow on huge repos; enable fsmonitor or use 'git status -uno' if untracked scanning dominates runtime.

Related commands

← All Git commands · Git cheat sheet · Git rebase vs merge