stash cascade merge propagates release branch pom.xml updates to 'develop'

When stash automatic merge is turned on version changes to pom.xml in release/X.Y_REL are merged to 'develop'.


  1. How can I avoid version changes to be propagated to develop?
  2. It can cause a merge conflict if other feature branches off 'develop' have been merged back to develop in the same time span.

We really like the automatic merge feature - how's everyone dealing with this scenario? What's best practice here?


Thanks a lot. 

3 answers

4 votes
Bryan Turner Atlassian Team Mar 19, 2015


When we create our release branches and update the version in pom.xml, we manually merge that up and discard the changes (we use git merge -s ours for that). Once that merge has been done once, all subsequent changes should automatic merge without reapplying the version change. We use a script to cut our releases in part to automate the process of doing that merge and discarding the changes. When cutting point releases (say, 3.7.1), we do that on a separate "release-3.7.1" branch (not "release/3.7.1", so the branch is not picked up as a "Release" branch by the branch model) so that we can do the same merge-discarding-changes back to the "release/3.7" branch (and then onto "release/3.8" and "master"). All of those merges are done manually, not using Stash.

Hope this helps,
Bryan Turner
Atlassian Stash

Not an answer but I think this duplicates my question here: 

0 votes

Bryan explained how we deal with this below. For a little bit of background, I've wrote about it a while ago, see "Merge strategies" on

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday 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 ROLLBAR_ACCESS_TOKEN...

214 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