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
If it is your current branch, just do
git branch -m new_name
If it is another branch you want to rename
git branch -m old_name new_name
- If your branch was pushed, then after renaming you need to delete it from the remote Git repository and ask your new local to track a new remote branch:
git push origin :old_name
git push --set-upstream origin new_name