Using 3-way view new interaction
Integration Method
Just install the Git plugin.
If you are installing version 1.68.1, you need to configure the setting git.experimental.mergeEditor to true. If you are installing version 1.69.0 or later, you need to configure the setting git.mergeEditor to true.
After configuration is complete, you can directly open the conflicting file in the merge change view of the scm panel to use the3-way interaction.
First, let's take a look at the effect
How to use3-way merge editor new interaction to solve code conflicts
3-way merge editor provides a more intuitive and rich code conflict resolution interaction, mainly composed of three windows:
- The left editor displays a read-only copy of the current local disk file.
- The right editor displays a read-only copy of the file passed in from the remote repository.
- The middle editor displays the read-write file of the common ancestor base branch of the two conflicting branches. All the results of the conflict resolution interaction are displayed in the middle view.
3-way merge editor uses Git's own diff3 feature to show you why your code file conflicts, and displays all code changes to the file (whether or not these changes are in conflict).
In contrast, the old version of conflict resolution only shows you where there are conflicting changes, and automatically merges incoming files in other areas that have not experienced conflicts.
Therefore, in the3-way view, you will see interactive operations even in areas without conflicts. These are necessary operating steps.