I use GIT to manage my project’s source code, using SourceTree locally and BitBucket to host the code remotely. I made a new branch, called “MyFeature.” At some point I renamed the branch, say to “features/MyFeature,” so that the branches would be better organized (I now have many more branches than before). However, it seems that now on BitBucket, there are two branches – “MyFeature,” and “features/MyFeature.” Is there a way to remove the old branch from BitBucket, so that there is only one branch, “features/MyFeature”? What is the best way to rename branches so that the branch names remain consistent across different checkouts of the GIT repository?
I use GIT to manage my project’s source code, using SourceTree locally and BitBucket
Share
To delete a branch from a remote, use git push:
Users of other clones have to rebase their local branches onto the renamed branch. Unfortunately, there’s no way to keep branch names in sync automatically.