1. kanpou0108

    No comment

    kanpou0108
Changes in body
Source | HTML | Preview
@@ -1,31 +1,45 @@
# Issue
`GitLens: Open Changes (with difftool)` 実行時に以下のエラーが出て、diff画面が開けない。
```
Unable to open changes in diff tool. No Git diff tool is configured
```
<img width="554" alt="0_Screen Shot 2019-03-24 at 10.24.24.png" src="https://qiita-image-store.s3.amazonaws.com/0/7902/a19f9c7e-5947-30cc-eab7-7304e3121e41.png">
ref) https://git-scm.com/docs/git-config#git-config-difftool
# Soltuion
以下を `~/.gitconfig` に追加
```
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
```
ref) https://code.visualstudio.com/docs/editor/versioncontrol#_vs-code-as-git-diff-tool
# Result
↓ `GitLens: Open Changes (with difftool)` を実行
<img width="1302" alt="1_Screen Shot 2019-03-24 at 10.21.21.png" src="https://qiita-image-store.s3.amazonaws.com/0/7902/25d68040-82cd-be17-0be6-bbbffca6d94f.png">
↓ diff画面が正しく表示される
<img width="938" alt="2_Screen Shot 2019-03-24 at 10.22.06.png" src="https://qiita-image-store.s3.amazonaws.com/0/7902/636af96a-41f4-389d-2c15-85efe8e0b198.png">
+
+# PS
+`git-difftool` について以下が参考になった。
+
+https://girigiribauer.com/archives/20161227/
+
+```
+[diff]
+ tool = vimdiff
+[difftool]
+ prompt = false
+```
+
+> これらの設定は git-diff 用ではなく git-difftool 用です。 それぞれお間違えなく。