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

1 accepted

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.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,872 views 1 5
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