DEV Community

Cover image for Resolving Merge Conflicts with Visual Studio Code
Leonardo Montini for This is Learning

Posted on β€’ Edited on β€’ Originally published at leonardomontini.dev

30

Resolving Merge Conflicts with Visual Studio Code

Today I launched my Discord server to talk about Open Source and Web Development, feel free to join: https://discord.gg/bqwyEa6We6


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 description

This was supposed to replace the old inline editor.

Image description

However, 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 window.

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!


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 just launched my Discord server to talk about Open Source and Web Development, feel free to join: https://discord.gg/Gtzcg4sggn

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

Feel free to follow me to get notified when new articles are out ;)

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay