Skip to content

Merge Conflict Tool merges source and target branches in reverse

Summary

Resolving a merge conflict on GitLab reverses target and source branches.

Steps to reproduce

  1. Create a merge that causes a merge conflict
  2. Click "resolve these conflicts" link to resolve the merge conflict in GitLab

Able to reproduce in CE 8.11.4 and gitlab.com

Reproduced on gitlab.com: https://gitlab.com/devdaniel/merge_bug/network/master

Expected behavior

Source branch is merged into target branch

Actual behavior

Target branch is merged into source branch

Relevant logs and/or screenshots

Merge contains conflict: merge_conflict_after_error

Resolving using tool: merge_conflict_during Note the difference between the intended merge (branch_a and master) and the automatic commit message (master into branch_b)

After attempting to resolve the merge, the page will show an error showing the intended source branch (branch_b) has been updated. merge_conflict_error At this point, the error merge has already been completed but the merge request will remain open and will ask if you want to merge it back in anyway.

Network looks like this as a result: merge_conflict_network