I am the only developer on a local project that is pushed daily to Bitbucket.
1) If I set a new main branch in the Bitbucket web interface (in my repo's settings), will that suffice, or do I need to do something locally as well?
2) If I set a new main branch in the Bitbucket interface (to say 'newmaster'), and then go to another computer and clone the repo, will I be getting newmaster downloaded instead of master?
3) Are there any risks involved when changing main branches in the Bitbucket web interface (such as corrupting the commit history or other damaging branches)?
Thanks!
Hi Peter,
I did a bit of testing on this and here is what I found out:
1) If you create a new branch in the Web UI you'll need to track that branch locally (in your working directory) and then ensure you are on that branch when you are making changes locally as well as pushing to that branch remotely. This is true whether you make the new branch the main (default) branch or not.
2) If you set a new main (default) branch named newmaster and clone the repo from a new computer you will be cloning the newmaster branch.
3) If you create newmaster from master there shouldn't be a need to worry since newmaster is picking up where master left off (commit history-wise). As far as damaging other branches, as I recall a branch, regardless of whether it is the default or not, can only affect another branch if it is merged into that branch. Creating a new branch and making it the default branch shouldn't inherently harm another branch.
I hope this informaiton is helpful!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.