git switch

Switch branches

low risk

interactive breakdown — edit the command and press Explain
$ 
What it does

Modern replacement for branch switching.

Common flags
FlagMeaning
-cCreate a branch
-Previous branch
Examples
git switch -c feature/xCreate and switch · explain & risk-check →
git switch -Back to the previous branch · explain & risk-check →
Related
git branch git checkout
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.