to_be_deletedBRANCH NAME TO BE DELETEDnew_nameNEW BRANCH NAME
- Rename the branch locally
git branch -m to_be_deleted new_name - Push it to the remote
git push origin new_name - Delete the remote old
git push origin :to_be_deleted - Delete the local old
git branch -D to_be_deleted
- Update all branches (this will trigger a 'your branch ref not found remotely')
git pull - Change to working name
git checkout new_name