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
Git version 2.9.2
If you want to change the name of the local branch you are on:
git branch -m new_name
If you want to change the name of a different branch:
git branch -m old_name new_name
If you want to change the name of a different branch to a name that already exists:
git branch -M old_name new_name_that_already_exists
Note: The last command is destructive and will rename your branch, but you will lose the old branch with that name and those commits because branch names must be unique.