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

This widget could not be displayed.

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.

This widget could not be displayed.

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

This widget could not be displayed.
Paul Watson Atlassian Team Oct 31, 2013

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

245 views 14 2
Join discussion

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