Visual Studio Code how to resolve merge conflicts with git? Visual Studio Code how to resolve merge conflicts with git? git git

Visual Studio Code how to resolve merge conflicts with git?


With VSCode you can find the merge conflicts easily with the following UI. enter image description here

(if you do not have the topbar, set "editor.codeLens": true in User Preferences)

It indicates the current change that you have and incoming change from the server. This makes it easy to resolve the conflicts - just press the buttons above <<<< HEAD.

If you have multiple changes and want to apply all of them at once - open command palette (View -> Command Palette) and start typing merge - multiple options will appear including Merge Conflict: Accept Incoming, etc.


After trial and error I discovered that you need to stage the file that had the merge conflict, then you can commit the merge.


  1. Click "Source Control" button on left.
  2. See MERGE CHANGES in sidebar.
  3. Those files have merge conflicts.

VS Code > Source Control > Merge Changes (Example)