git branch

List, create or delete branches

medium risk

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

Manages local branches. See the flags and examples below, and run `man git` for the full reference.

Common flags
FlagMeaning
-aAll branches
-vvVerbose with upstream
-dDelete (merged only)
-DForce delete⚠ Loses unmerged commits (recoverable via reflog).
-mRename
Examples
git branch -vvBranches and tracking · explain & risk-check →
git branch -d oldDelete a merged branch · explain & risk-check →
Related
git switch 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.