Using Git in Windows Subsystem for Linux through IntelliJ : <p>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 installed to Creators Update (Version 1703), reinstalled WSL and tried again, here's what I did:</p>

<p>I created a .bat script:</p>

<pre><code>@echo off
C:\Windows\System32\bash.exe -c "git %*"
</code></pre>

<p>So when running it:</p>

<pre><code>C:\Users\Limon\Desktop&gt;bash.bat --version
git version 2.7.4
</code></pre>

<p>So then I tried to set this bat at the git executable in IntelliJ:
<a href="https://i.stack.imgur.com/TIvMG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TIvMG.png" alt="Setting Git executable in IntelliJ"></a></p>

<p>And it worked! But everything else fails, for example when I try to pull or branch in IntelliJ, I get:</p>

<pre><code>Couldn't check the working tree for unmerged files because of an error.
'C:\Windows\System32\bash.exe' is not recognized as an internal or external command,
operable program or batch file.
</code></pre>

<p>Any ideas on how fix this? I don't really know anything about batch scripting. It works perfectly off command line.</p>
