Resolving Merge Conflicts with Visual Studio Code


Merge conflicts can be scary, but if you know how to use your tools, there’s no need to worry!
(Unless you’re merging two branches 3 months old and there are 57 files with multiple conflicts. In that case, panic is understandable!)

Visual Studio Code recently introduced the three-way merge editor.

Image descriptionThis was supposed to replace the old inline editor.

Image descriptionHowever, as soon as the new editor has been set as default, the community loudly asked to get their old UI back. Have a look at Issue#160806

You can toggle which one you want to use from the git.mergeEditor setting.

To be honest, I really like the inline experience of handling merge conflicts that VSCode (and many other tools!) offers.

It makes everything easier as you don’t need to worry about the UI, all you have to think about is the code that is conflicting.

I tested the three way editor and it’s not bad, but it adds a layer that sometimes is unnecessary. Again, personal opinion here.

But what’s the point in handling conflicts directly in your IDE?
The main advantage is that you already have all the tools you need, and while resolving the conflicts you can for example format the code and recompile without having to swap windows.

Since I use VSCode as my primary IDE (actually, it’s a text editor), I recorded a video showing the main features it offers to help you.

I also showcase both inline (old) and three-way (new) editors, so you can decide which one you like the most!

You can find the video here:

What do you use to resolve merge conflicts? If the answer is Visual Studio Code, which one of the two UIs do you use, three way or inline?

Thanks for reading this article, I hope you found it interesting!

I recently launched my Discord server to talk about Open Source and Web Development, feel free to join:

Do you like my content? You might consider subscribing to my YouTube channel!
You can find it here:

Leonardo Montini

Leonardo Montini

I talk about Open Source, GitHub, and Web Development. I also run a YouTube channel called DevLeonardo, see you there!

2 thoughts on “Resolving Merge Conflicts with Visual Studio Code

  1. Awesome stuff, thanks for sharing examples!

  2. I run into these errors alot, thanks for sharing these amazing insights!!