Search code examples
gitgithubvisual-studio-codemerge-conflict-resolution

When we click "accept both changes" in vscode, Which command will be executed during merge conflict?


I wanted to any git command for accepting both changes.(ours and theirs). Then, I am curious about how the vscode is doing that. Can anyone help me?


Solution

  • You can check exactly what commands are run in the "Git" console, under the "Output" tab:

    A screenshot of a Git console window. At the top are 4 tabs: Problems, Output, Debug Console, and Console. The Output tab is selected. To the right of the tabs is a dropdown, with "Git" selected. There are 5 icons the the right of the drowdown. Below the header various Git commands are shown.

    In this case, VSCode doesn't run any Git commands to accept both changes: it just removes the conflict markers by itself.