R
R
Roman Dubinin2017-10-24 07:12:34
git
Roman Dubinin, 2017-10-24 07:12:34

How to force PhpStorm to use git installed in WSL?

I got tired of all these mingw, msys2, Git for Windows, etc., I wanted to unify everything and bring it into one environment.
Windows Subsystem for Linux seemed to me the best option: from there you can easily install both apache2 and php and git and in general everything your heart desires, while it all works as usual and conveniently.
For quick access to these programs from cmd, I put bat-nicknames of this kind in the C:\.aliases folder (added to PATH):
git.bat

@echo off
bash -c "git %*"

After that, everything works fine from the console, only quotes have to be escaped...
But then I open PhpStorm and it tells me that "git doesn't work". I tried to specify a direct path to git.bat in the settings, but when I click on the test button, it hangs for a very long time and nothing happens in the end.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
chervand, 2017-11-10
@romash

https://gist.github.com/jmickela/7c383c78af66a37a2... try this, it might help.
In general, apparently (and the jetbrains bug tracker), there will not be any adequate solution in the near future.

K
KazeZlat, 2019-11-08
@KazeZlat

I understand that it's a bit late, but a workaround has appeared:
https://github.com/Volune/wslgit-for-jetbrains

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question