Rename a branch
Renames the local branch, while the remote branch keeps its old name until you push the new one.
git branch -m old_name new_nameEdit the highlighted values, then copy. They are inserted as typed, without shell escaping.
Report an issue (opens in a new tab) wrong command, wrong danger level, typo… (on GitHub)
Adapted from tldr-pages (common/git-branch.md), licensed under CC BY 4.0.