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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Getting the base branch right

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 Oct 08, 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.

 

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").

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 Oct 08, 2020

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

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

@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
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,912 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you