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 wh
Changing the branch locally is quite easy...
If you are on the branch you want to change the name for, simply do this:
git branch -m my_new_branch
Otherwise, if you are on master
or any other branch other than the one you'd like to change the name, simply do:
git branch -m my_old_branch my_new_branch
Also, I create the image below to show this in action on a command line. In this case, you are on master
branch, for example: