Renames a local branch.
git branch -m <old-name> <new-name>to rename
git branch -m <old-name> <new-name>
git checkout master git branch -m patch-1 patch-2 # Renames `patch-1` to `patch-2`
Renames a branch both locally and on the remote.
Forces an update of the remote branch after rewriting the history locally.
Moves local commits from the
master branch to a new branch.