Add Keep Both
option for resolving merge conflcits
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to Solve
When resolving conflicts in a merge request, sometimes you may need to keep both our changes
and their changes
depending on the information that's being changed. The only way to perform that action in GitLab is to edit the file and remove all of the conflict markers to submit a change that containing both sets of changes.
Proposal
Add an additional option for the conflict resolution that allows you to keep both
changes which would automatically remove the conflict markers and combine the changes.
- Add a button to the interactive mode "Use both"
- Update the description from "To resolve the conflicts, either use interactive mode to select Use ours or Use theirs ..."
- New copy: "To resolve the conflicts, either use interactive mode to select Use ours|Use theirs|Use both ..."
- When selected both changes will be in their selected (darker green and darker blue)
- When changes are committed it will include
ours
thentheirs
changes
This means when there is a conflict like this on a single line
<<<<<<< ours
foo
=======
bar
>>>>>>> theirs
It will be merged as
foo
bar
View | Idle | Use ours | Use theirs | Use both |
---|---|---|---|---|
Side by side | ![]() |
![]() |
![]() |
![]() |
Inline | ![]() |
![]() |
![]() |
![]() |
Edited by 🤖 GitLab Bot 🤖