I\'m trying to set Git executable in IntelliJ to be the git installed in Windows Subsystem for Linux, I tried a few different ways, but always got some sort of error. Today I in
As Gabrielizalo answered earlier, you need to use version 2020.2 and higher.
Go to Settings | Version Control | Git
Add \\wsl$\YOUR-WSL-VERSION\usr\bin\git
to the Path to Git executable.
Please note, if you are using the WLinux distribution, you need to use the name Pengwin.
Even though the wsl -l
command outputs the name as WLinux. Perhaps It will be fixed in future versions.
This is how it works for me \\wsl$\Pengwin\usr\bin\git
.