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
Rename the branch using this command:
git branch -m [old_branch_name] [new_branch_name]
-m: It renames/moves the branch. If there is already a branch, you will get an error.
If there is already a branch and you want to rename with that branch, use:
git rename -M [old_branch_name] [new_branch_name]
For more information about help, use this command in the terminal:
git branch --help
or
man git branch