Git Config Cookbook/Configure VS Code merge command

Define command for the merge tool.

Section: Diff and Merge Tools

Configure VS Code merge command

bash
bash
git config --global mergetool.vscode.cmd 'code --wait "$MERGED"'

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Diff and Merge Tools
Use VS Code merge tool
Set preferred merge tool name.
OpenIn sheetbashsame section
Disable difftool prompt
Skip confirmation before launching external difftool.
OpenIn sheetbashsame section
Launch difftool
Run configured external diff viewer.
OpenIn sheetbashsame section
Launch mergetool
Open merge tool for unresolved conflicts.
OpenIn sheetbashsame section
Set repo-specific user name
Override global identity in one repository.
OpenIn sheetbash1 tag match
Require fast-forward pulls
Fail pull if it would create a merge commit.
OpenIn sheetbash1 tag match