我正在尝试切换WebStorm(WS)以使用Windows Linux子系统(WLS)。
到目前为止,我有WLS bash在cmd和WS中工作。 我运行的是64位版本的WS,并在settings->tools->terminal
shell path中设置为bash.exe
。 这正确地加载WLS bash到WS的terminal窗口。 但是,即使在terminal,我可以正常使用Git命令,我无法弄清楚如何设置settings->version control->git
path到git可执行文件。
请记住,对于WS(和其他Intellij产品),这是IDE本身的git。 虽然我不太在乎它,但它不断地发出警告,说它无法启动Git。 另外我觉得它自从上次在文件编辑器中提交以来,在修改的行的开始处具有灰色颜色标记是非常有用的。
我试过的东西
Git可执行文件的path:
C:\Windows\System32\bash.exe
– > errors while executing git --versions. exitCode=-1
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
— "C:\Windows\System32\bash.exe" --login -i
– > Cannot run program ""C:\Windows\System32\bash.exe" --login -i": CreateProcess error=87, The parameter is incorrect
之前,在运行Git Bash for Windows时,这是正确的path: “C:\Program Files (x86)\Git\bin\sh.exe” –login -i
任何帮助,将不胜感激。
我也标记其他Intellij产品,因为这个问题应该是普遍的大多数,如果不是全部。
添加信息(编辑):
我没有在Windows安装git,git只存在于WLS中。