Merge pull request no automatic merge


We are currently using  Stash's auto merge feature to roll changes forward between releases. We also use Pull Requests to get the nice Peer Review features.

We have just come across an issue where we had two release branches (e.g. 1.0 and 1.1) on the go and we had to put in an emergency fix into 1.0. This had already been fixed in a different way in 1.1. In this case we still want to use a pull request for the peer review however we don't want to automatically merge the change forward because it will cause a merge conflict that we don't want to have to solve or even worse it will merge in an unexpected manner.

Is it possible to do this, merge the pull request but opt out of the automatic merge? We are aware that any changes we did want to roll forward past this point would have to be cherry picked.

1 answer

1 accepted

1 vote
Answer accepted
Adam Ahmed Atlassian Team Oct 07, 2014

You can't opt-out of auto-merge except by manually turning off auto-merge in the repository settings.

One thing you can do though, is to do a no-op merge to 1.1 before merging the 1.0 PR. From your situation it sounds like you want to mark the PR as merged to 1.1 without actually taking any of the changes in the PR. Git lets you do this with the "ours" strategy. E.g.


git checkout 1.1
# "merge" in the change, without actually taking the file changes
git merge -s ours my-pr-to-1.0
git push

Now when you merge the PR to 1.0, it will have already been merged to 1.1, so the auto-merge won't make any changes to 1.1.

I figured this would be the case. That also seems like a good work around. Thanks Adam.

Adam Ahmed Atlassian Team Oct 09, 2014

After thinking about it a bit, I created as an enhancement for doing this through the UI. I'm not sure we'll implement it, but I personally would find it useful. :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

296 views 0 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