Conflicted pull request - why merge to target?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2015

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
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 4, 2015

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.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2015

> 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
TAGS
AUG Leaders

Atlassian Community Events