配置 Visual Studio Code 作为 Git 默认合并工具和对比工具

将下列内容添加到 .gitconfig

# Comment: Start of "Extra Block"
# Comment: To unlock Visual Studio Code as your Git diff and Git merge tool
[merge]
    tool = vscode
[mergetool "vscode"]
    cmd = code --wait $MERGED
[diff]
    tool = vscode
[difftool "vscode"]
    cmd = code --wait --diff $LOCAL $REMOTE
# Comment: End of "Extra Block"

参考文献

How to use Visual Studio Code as the default editor for Git MergeTool - Stack Overflow