Choosing merge strategy for Pull Request

Is it possible to choose the merge strategy on a Pull Request?

There is some reference to such options in the stash-config.properties file in https://jira.atlassian.com/browse/STASH-2857 and https://jira.atlassian.com/browse/STASH-2810, but they are not available in the current doc https://confluence.atlassian.com/display/STASH/Stash+config+properties

Is this option still active in 2.8.2? What are the possible values?

Thanks, Marian

3 answers

2 accepted

Accepted Answer
3 votes

Hi Marian,

We definitely haven't removed the option. I'm not sure why the doc doesn't mention them. The valid options are (still):

  • ff - allows fast-forward merges but will create merge when necesssary
  • ff-only - will never create merge commits; all merges must be fast-forward or a MergeException will be thrown
  • squash - collapses all the incoming commits into a single commit directly to the target branch and will never create a merge

Cheers,

Charles

Hi Charles,

thanks for the fast answer.

https://jira.atlassian.com/browse/STASH-2857 mentions "no-ff" being the default option. Is this correct and also a valid value?

Thanks, Marian

Hi Marian,

Apologies for not mentioning 'no-ff' - it is the other value, and the default.

Charles

Bryan Turner Atlassian Team Oct 31, 2013

Stash 2.9 will add:

  • squash-ff-only - As with "squash", collapses all the incoming commits into a single commit directly to the target branch, never creating a merge, but does so only if the source branch is fast-forward. If not, a MergeException will be thrown.

This basically combines the "squash" and "ff-only" options, as its name suggests.

Accepted Answer
1 vote

It's even clearer (accessible from the UI) and better since Bitbucket 4.9, released yesterday wink https://confluence.atlassian.com/bitbucketserver/checks-for-merging-pull-requests-776640039.html#Checksformergingpullrequests-strategies

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,363 views 9 12
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you