Search code examples
gitvisual-studio-codegit-mergemerge-conflict-resolutiongit-merge-conflict

Not getting GitHub merge conflicts Top-bar in Visual Studio Code


I am having trouble getting this GitHub merge conflict Top-bar to resolve the conflicts in Visual Studio Code.

I have tried adding this command "editor.codeLens": true but no effect.

This is what I am getting after pulling the changes enter image description here

And this is what I want after pulling. enter image description here

I am using VS Code 1.70.1


Solution

  • The reason is that Visual Studio Code has recently introduced the 3 way merge editor and has made it the default tool for resolving the merge conflicts.

    If you don't feel comfortable using it, you can disable it by going to the following path in the Visual Studio Code settings and removing the checkmark:

    path: settings > extensions > git > Merge Editor

    enter image description here

    Or by directly setting the following in the Visual Studio Code's settings.json:

    "git.mergeEditor": false
    

    You DON'T need to set editor.codeLens to true in the settings.