How do I rename a local Git branch?
Asked 07 September, 2021
Viewed 1.6K times
  • 63
Votes

I don't want to rename a remote branch, as described in Rename master branch for both local and remote Git repositories.

How can I rename a local branch which hasn't been pushed to a remote repository?

In case you need to rename a remote branch as well:
How do I rename both a Git local and remote branch name?

30 Answer