--- title: Rename a branch type: snippet language: git tags: [branch] cover: bug dateModified: 2021-04-13T21:10:59+03:00 --- Renames a local branch. - Use `git branch -m ` to rename `` to ``. ```shell git branch -m ``` ```shell git checkout master git branch -m patch-1 patch-2 # Renames `patch-1` to `patch-2` ```