Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Visual Studio Code extension is good for 3 way (or 4 way) merging?

I am currently learning Visual Studio Code. I come from a WebStorm background. Is there an option or extension to merge 3 ways?

Where in Visual Studio Code can I merge conflicts?

At the moment, I thought I had resolved all the changes but when I run git status it says there are still unmerged paths?

Where can I see these unmerged paths in VSCode or else when do I know when I merged everything?

like image 259
bier hier Avatar asked Sep 01 '25 17:09

bier hier


1 Answers

Update for v1.72: see Merge Editor: Provide a 4-editor view which also shows the base editor (also known as 4-way merge to some):

The next version will have an (optional) base pane:

'Mixed Layout With Base'
merge.mixedLayoutWithBase

4-way merge with base editor


Three-way merge (3-way merge) is being built into vscode v1.69. See Release notes; 3-way merge,

In this release, we continued working on the 3-way merge editor. This feature can be enabled by setting git.mergeEditor to true and will be enabled by default in future releases.

The merge editor allows you to quickly resolve Git merge conflicts. When enabled, the merge editor can be opened by clicking on a conflicting file in the Source Control view. Checkboxes are available to accept and combine changes in Theirs or Yours:

demo of 3-way merge

All language features are available in the merge editor (including diagnostics, breakpoints, and tests), so you get immediate feedback about any issues in the merged result.

The result can also be edited directly. Note how the checkbox update as expected:

further demo of 3-way merge

When closing the merge editor or accepting the merge, a warning is shown if not all conflicts have been addressed.

The merge editor supports word-level merging - as long as the changes don't intersect, both sides can be applied. If the insertion order matters, it can be swapped. At any time, the conflict can also be resolved manually.

demo 3 of 3-way merge

like image 110
Mark Avatar answered Sep 07 '25 22:09

Mark