Hi,
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.
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.
After thinking about it a bit, I created https://jira.atlassian.com/browse/STASH-5356 as an enhancement for doing this through the UI. I'm not sure we'll implement it, but I personally would find it useful. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.