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
git diff
Shows line-level differences between commits, the index, and the working tree. Without arguments, compares unstaged changes to the index.
git add
Stages file changes into the index so they are included in the next commit. Supports whole files, directories, and interactive patch selection.
git log
Displays commit history in reverse chronological order with filters for author, date, path, or content. The primary tool for exploring project history.