I have
In my experience, I was able to change this setting from the General > Repository Details sidebar menu tab. In the main content area, there is an Advanced section that is closed by default. Open it and there are other settings, including one for "Main branch"
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the correct answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @rakesh-eminence,
In Bitbucket Cloud, please go to [Your Repository] >> Settings >> General >> Repository details >> Update repository details >> Main branch.
At the same time, I would suggest you on having a look at Branching a Repository, focusing on The Branching model which describes the DEVELOPMENT label and PRODUCTION (disabled by default).
More information is also available on Weird square appeard on Branch site.
Hope the above answer to your inquire.
Kind regards,
Rafael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Rafael Pinto Sperafico
After following the above - I am still seeing in the branches view that master is identified as MAIN. I can only view develop branch when I change the selection criteria to all branches.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn't work for me.
The branch can only be chose from dropdown list.
But it always limit 25 results and not searching exactly the text I type in, just list out any branch name including that text.
So I could not find the correct branch to set it as main branch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is still no way to change the default initial main branch name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai's answer was the answer I ended up here looking for. That pull down isn't clear about the fact that it's limited to a fixed number of branches.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here are the steps to change the "Main" branch
Now your main branch is changed.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can someone please provide some screenshots (from 2022)? I am lost in an endless web of sidebars, ever-shifting avatars (top left, bottom right), Cloud, Personal Settings, Account Settings, and other endless menus that is the Atlassian eco-mess. Where exactly do you find any of these menu items in Bitbucket??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ken,
TL;DR the suggested solution only works if you already have a "main" branch in your repo. It also needs to be performed per repo.
The default name is still "master". A new ticket was made for this that you can find here: https://jira.atlassian.com/browse/BCLOUD-22261
Made a quick test repo. The location mentioned is located under the repository settings (last item, on the left hand side bar at time of writing this).
Clicking it you automatically end up at the "repository details" page.
On that page you scroll down, and open the "Advanced" section. In that section there is a drop down where you can select what your "main branch" should be. But it only lists the available branches on your repo.
If you create an empty repo, and don't specify the default branch name it still only lists "Master" as an option.
Kind regards,
Stijn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. Any movement on fixing this? As you rightfully pointed out, Atlassian is contradicting themselves preaching to move away from the "master" terminology, but then providing no easy/automatic setting to do so!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ken,
I don't work for Atlassian so I can't provide an update on this ticket.
One way to work around it is to create a new branch from "master" called "main". Then go into the repo settings and change the "Main branch" setting to "main". From there you could delete to "master" branch.
If you normally work in branches and merged towards "master" by creating a pull requests from the web client, then Bitbucket should now suggest "main" as destination instead of "master" independent of where you branched of from (it seems to suggest whatever branch is labeled "main" as the destination of PRs ).
Obviously if you work with a "stable trunk" style way of working and directly push changes on "master" then you need to align the change to "main" with other users.
Also, this has to be done per repository. As far as I know there is no way to change this in all repositories in a workspace at the same time.
Hope this helps,
Stijn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
let me know answer?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is there a way to change the default setting from master to main?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have not seen it built into BitBucket, however what you can do is create a new "main" or "mainline" branch from master, set that as the root and then delete master.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
100% agree
If you create a Jira SW Project and select to create a repo, it creates the master and not main. Pretty average UX and integration between the tools.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@davidajacobus @Josh Beauregard @jake-aft
The bug looks like it was fixed. As mentioned above, it is described in https://jira.atlassian.com/browse/BCLOUD-22261, but the status is out of date... nobody had said it was fixed, but I just confirmed and left an note in the bug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.