git diff

Show changes

low risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

Compares working tree, index and commits.

Common flags
FlagMeaning
--staged --stagedStaged changes
--stat --statSummary
-wIgnore whitespace
Examples
git diff --stagedReview before committing · explain & risk-check →
git diff main...HEADChanges on this branch · explain & risk-check →
Related
git status git log
Open the full explainer →More in Git

Reference text is hand-written and may be incomplete — check man git for your version. Test destructive commands on a non-production system first.