ref – https://linuxize.com/post/how-to-rename-local-and-remote-git-branch/
git checkout fix/bug-51
You’re now on bug-51
git branch -m fix/bug-52
git branch
SimpRegBtnFix
basic-share
basic-share-api
bug-47
china-locations
connect-to-api
dev
fix/bug-45
* fix/bug-52
functional-screens
integrate-qr
inviter
Locally, you’ve changed your name. Now you gotta reflect it at remote.
git push origin -u fix/bug-52
Total 0 (delta 0), reused 0 (delta 0)
remote:
remote: To create a merge request for fix/bug-52, visit:
remote:
* [new branch] fix/bug-52 -> fix/bug-52
Branch ‘fix/bug-52’ set up to track remote branch ‘fix/bug-52’ from ‘origin’.
delete your old branch
git push origin –delete fix/bug-51
– [deleted] fix/bug-51