- Switch to the local branch you want to rename
git checkout <old_name>
1
- Rename the local branch
git branch -m <new_name>
1
- Push the
<new_name>
local branch and reset the upstream branch
git push origin -u <new_name>
1
- Delete the
<old_name>
remote branch
git push origin --delete <old_name>
1
Comment