Rename a branch in GIT / BitBucket
The commands which works for me to rename a branch in GIT
- Rename a local branch first : git branch -m <old-name> <new-name>
- Delete remote branch : git push origin :<old-name>
- Push new branch to remote: git push origin <new-name>
- Reset the upstream branch to a new name: git push origin -u <new-name>
Comments
Post a Comment