Rename the old branch under .git/refs/heads to the new name
Rename the old branch under .git/logs/refs/heads to the new name
Update the .git/HEAD to point to yout new branch name
git branch -m old_branch new_branch # Rename branch locallygit push origin :old_branch # Delete the old branchgit push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
git branch -m old_branch new_branch # Rename branch locallygit push origin :old_branch # Delete the old branchgit push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote