Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What does the "Main branch" settings in Repository details means?

Luis Lobo November 17, 2016

What does the "Main branch" settings in Repository details means?

We noticed that if we change Main branch, if you create a new branch, then. the Main branch is the default "destination" when you want to merge it back. Is this the only use for the Main branch setting? 

Is there any problem in making our "Main branch" the "Development" branch instead of "master"?

 

4 answers

1 vote
Geoff Wilson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2016

Just as you two have commented on, in Bitbucket 4.8.5 there is no "main" branch setting, however there is the Default Branch setting on the same Repository Details page with the description:

Select the default branch for browsing and cloning the repository. Git chooses the "master" branch by default.

Therefore, just as you suspected, it should not have any undesired effects by setting this to Development, especially if you're worried about accidentally committing or merging into the Master.

jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 2016

Bitbucket Cloud calls it "main branch", since new Mercurial repos have "default" instead of "master".

Like Ron Helms likes this
0 votes
Stephan Pauxberger September 10, 2019

Actually, there is a rather unexpected behaviour change for the main branch, which I did not find documented anywhere:

When looking a commit, normally Bitbucket shows all branches containing that commit in the top right corner (same as "git branch --contains <commit>").

However, when the main branch is part of that list, *only* the main branch is shown there (and reported back by the rest api via branch-utils/info.

Took me a while to find this as the cause of problems in our application

0 votes
Luis Lobo November 17, 2016

Yeah, I know about that, we are just not sure if the Main branch setting has some other use or if changing it has any other implications. We found no reference about it in Bitbucket Help

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2016

I don't know the answer to the first part, but you can make it whatever you want. The "development" and "master" branches are just default because they're so common, nothing about git requires that your repository contains either one.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events