Accept remaining (left or right) in comparison

已回答

When doing a comparison with IntelliJ for merge conflicts, one can not use a quick option to accept all remaining line versions from one side.

Example: 
- Presume we have 101 conflicts, one needs to be adapted by hand and 100 can be taken from the right side.
If I correct the one and then click “Accept Right”, my manual changes will be overwritten. The other option is to click accept and ignore 100 times, which is a lot of effort.

So, is there or can you implement an option to accept the remaining conflicts, after manual curation, from one side of the comparison?

0
Hello Josua,

Thanks for your feedback. IntelliJ IDEA currently provides commands to apply all non-conflicting changes from one side, as well as commands to resolve individual conflicts using the left or right side. However, the merge editor doesn't have a clearly documented command to apply the selected side to all remaining unresolved conflicts while preserving conflicts already resolved manually.

This is a valid usability request, especially for files with many conflicts. A related feature request has been tracked in YouTrack as IJPL-181781 (https://youtrack.jetbrains.com/issue/IJPL-181781).

For now, we recommend resolving the exceptional conflicts manually first and then using the available bulk action for non-conflicting changes. Please review the result in the central pane before applying the merge, since accepting an entire side can replace existing content.
0
Hello Josua,

The team has provided us with additional information on this case. 
1. For each conflict you want to curate by hand: right-click on that hunk in the middle pane → Resolve using Left (or Resolve using Right and pick whichever side is needed).
2. Then `Ctrl/Cmd + A` to select all in the middle pane → right-click → Resolve using Right. The hunk resolved in step 1 is now skipped; every other conflict takes the right-side values.

For further assistance, you may contact us at support here: https://intellij-support.jetbrains.com/hc/en-us/requests/new?ticket_form_id=66731
1

请先登录再写评论。