WebStorm Git集成和Windows Linux子系统

Mir*_*vic 5 windows git bash phpstorm webstorm

我正在尝试将WebStorm(WS)切换为使用Windows Linux子系统(WLS)。

到目前为止,我已经在cmd和WS中使用WLS bash。我正在运行WS的64位版本,并且在settings->tools->terminalshell路径中将其设置为bash.exe。这样可以将WLS bash正确加载到WS的终端窗口中。但是,即使在终端中我通常可以使用Git命令,也无法弄清楚如何设置settings->version control->gitgit可执行文件的路径。

请记住,对于WS(和其他Intellij产品),这是IDE本身的git。尽管我对此并不在乎,但它不断发出警告,提示它无法启动Git。我还发现,自从文件编辑器本身中的最后一次提交以来,在修改行的开始处带有灰色标记几乎是有用的。

我尝试过的事情

Git可执行文件的路径:

C:\Windows\System32\bash.exe -> errors while executing git --versions. exitCode=-1

C:\Windows\System32\bash.exe -login -i -> Cannot run program "C:\Windows\System32\bash.exe -login -i": CreateProcess error=2, The system cannot find the file specified

"C:\Windows\System32\bash.exe" -login -i -> Cannot run program ""C:\Windows\System32\bash.exe" -login -i": CreateProcess error=87, The parameter is incorrect

"C:\Windows\System32\bash.exe" --login -i -> Cannot run program ""C:\Windows\System32\bash.exe" --login -i": CreateProcess error=87, The parameter is incorrect

之前,在运行Windows版Git Bash时,这是正确的路径: “C:\Program Files (x86)\Git\bin\sh.exe” –login -i

任何帮助,将不胜感激。

我也在标记其他Intellij产品,因为对于大多数(如果不是全部)这些问题应该是普遍的。

附加信息(编辑):

我没有在Windows中安装git,git仅存在于WLS中。