Conflicted pull request - why merge to target?

Just a curiosity in the stash UI... if you have a pull request with file conflicts, the instructions it gives you are to manually merge your changes from "topic" to "master" (or whatever... source to target). 

I'm wondering why it's that and not the commands to merge from master to topic (or rebase topic on master). The instructions seem to be telling you to bypass the whole PR workflow... eg minimum approvers or reviewers, merge request checks etc.

Wouldn't you want the merge to be done and the reviewers to be able to review the results of the merge? Perhaps also the person(s) who need to do the merge don't have permissions to push directly to the target branch.

1 answer

1 accepted

5 votes

There are situations where merging target  back into source is inappropriate, such as when you have a pull request from release/1.0 --> release/2.0. In that case, the only correct way to resolve the merge conflict is to merge the pull request manually.

Stash tries to give you tailored merge conflict resolution instructions by looking at the branches involved and the branching model that you've configured. If your source branch can be 'classified' as 'feature', 'bugfix' or 'hotfix', then the merge conflict resolution instructions will tell you to merge 'target' back into the 'source' to resolve the conflicts.

> If your source branch can be 'classified' as 'feature', 'bugfix' or 'hotfix', then the merge conflict resolution Ah, that explains why I could have sworn I'd seen the reverse instructions before. Thanks Michael.

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,760 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