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

Getting the base branch right

Patrik Tesar October 8, 2020

Hello, we want to have a merge strategy our way, but we can't get it straight.

 

In the beginning, there is a master from the master we create a branch stage and from stage branch we create dev

 

So far, so good.

 

Then we start developing in the dev and at some moment we want to test on our test environment we want to go to the stage, BUT!! When we create a pull request, the master is offered as a base branch, NOT STAGE!

 

And what is even crazier when we want to create a pull request from stage to master as a base branch where we should create a pull request is offered dev!!

 

Please help us to solve this issue.

 

Thx

 

Patrik

1 answer

1 vote
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2020

The default branch used when creating a pull request is determined by the default branch you have on your repository. If you go to your Repository settings > Branching model and from here you can set your default branch and your production branch. By default master will be your default branch, and it sounds like dev is set as your production branch. Have a look at Branch a repository for more information.

Julius Davies _bit-booster_com_
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.
October 8, 2020

 

Default branch is not set on "Branching model" on Bitbucket Cloud.

It's set on "Repository settings -> Repository details -> Advanced -> Main branch"

 

(And for anyone on Bitbucket Server rather than Bitbucket Cloud, it's also on "Repository details" but under "Default branch").

Patrik Tesar October 8, 2020

This is how I have it:

Bildschirmfoto 2020-10-09 um 00.13.41.pngThen here are screenshots from branches:

Bildschirmfoto 2020-10-09 um 00.13.50.pngBildschirmfoto 2020-10-09 um 00.14.12.png

Bildschirmfoto 2020-10-09 um 00.14.01.png

Even I try to change it in the bitbucket, it does not allow it to me!!!

 

Please provide a fix for this. We need to have the merging strategy right!

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2020

In order to change the branching model you have to have repository admin permissions. 

Patrik Tesar October 8, 2020

Hello @Mikael Sandberg i‘m the admin and owner of the repo. Bitbucket change it, even when I do refresh, it‘s changed, then when I move to different branch and back, it‘s again the old one!!! Even git rebase is somehow ignored from bitbucket! Thx for help

Patrik Tesar October 8, 2020

@Mikael Sandberg I can make a video if it will help

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events