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

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

Help with branching and merging strategy


We have a project with following three main branches:

  • development: used to deploy to DEV environment
  • staging: used to deploy to staging environment
  • release: used to deploy to production environment

Our default merging strategy is Squash, fast-forward only --squash --ff-only i.e., If the source branch is out of date with the target branch, reject the merge request. Otherwise, combine all commits into one new non-merge commit on the target branch.

We like this strategy for PRs where the source branch is a temporary branch created by the developer for purposes of code-checkin, but this policy is not desired when the source branch is one of {development, staging, release}. And I think this is a common use-case and scenario. However we cannot find any setting to allow a different merge strategy when the source branch is one of {development, staging, release}.

How can we do this? I think what we are asking is common practice in development where any on-going changes are committed as --squash --ff-only by developers but merges between the three canonical branches are made using the traditional merge strategy of Merge commit --no-ff i.e.:

Always create a new merge commit and update the target branch to it, even if the source branch is already up to date with the target branch.


0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,734 views 10 16
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