C
C
Const V2020-04-19 04:19:11
git
Const V, 2020-04-19 04:19:11

How to screw VSCode as external difftools for git inside WSL?

Am I really a pervert that I do such things - make up sites in Windows 10, native Windows WebStorm, and work with git through the WSL terminal?

But I managed to attach VSCode as an external editor for git commit:

[core]
        editor = '/mnt/c/Users/const/AppData/Local/Programs/Microsoft VS Code/code.exe'

And it works! :)

I managed to get it to run as difftools:
[diff]
    tool = vscode
[difftool "vscode"]
    cmd = '/mnt/c/Users/const/AppData/Local/Programs/Microsoft VS Code/code.exe' --wait --diff $LOCAL $REMOTE


But when running VSCode, it throws an error:
C:\Users\const\WebstormProjects\test-git-02\README': Unable to read file 'c:\tmp\8jW60h_README' (Error: Unable to resolve non-existing file 'c:\tmp\8jW60h_README').

Where do these wild paths to temporary files come from?..

If you remove $LOCAL, then the files are opened, but without comparison of differences

.

UPD
Through the bash windows emulator - Cmder I was able to configure VSCode as difftool without any problems. Apparently the built-in Ubuntu is too built-in. Either install a full-fledged dual block, or don’t torment WSL in vain, just waste time.

The funny thing is, git Cmder takes settings not from its own directory, but from Windows Ubuntu

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question