git add

Stage changes

low risk

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

Stages files for the next commit. See the flags and examples below, and run `man git` for the full reference.

Common flags
FlagMeaning
-pInteractively choose hunks
-AStage everything incl. deletions
-uOnly tracked files
-nDry run
Examples
git add -pStage selectively · explain & risk-check →
git add -n .Preview · explain & risk-check →
Related
git commit git status
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.