- Published on
Git FAQ: How to Rename a Local Branch
- Authors
- Name
- Mike Tsamis
To rename the current branch you’re pointed to locally, run the following command:
git branch -m <new_name>
“-m” is short for “--move” which is a command commonly used to rename files on Git. To rename a branch while pointing to another branch locally, you run the same command except you need to also specify the current name of the branch:
git branch -m <old_name> <new_name>