git バージョン 2.31.1.windows.1 をインストールし、すべての git に示されているすべての必要な手順に従い、VSCode をメインの difftool として使用しようとしました。これらの行を gitconfig ファイルに入れました。
[diff]
tool = vscode
[difftool "vscode"]
cmd = "code --wait --diff $LOCAL $REMOTE"
[difftool]
prompt = true
次の手順を使用します。
git config --global diff.tool vscode
git config --global difftool.vscode.cmd "code --wait --diff $LOCAL $REMOTE"
また、Windows のPATHにVSCode を追加しましたが、実行時に VSCode を開くのに問題はありませんがgit config --global -e
、コマンドを入力してgit difftool
も何も起こらず、新しい行が開始されます。