If you have installed Github Desktop on Windows, you may have noticed that the application itself comes with a “Git Shell” which is basically a linux terminal emulator running on windows and its very useful for developers or linux users that are familiar with bash.
The problem I recently encountered was trying to find the executable PATH of the git-bash.exe so that I can configure my Webstorm IDE to use it. All the documentation on the internet seems to point to C:/Program Files/Git folder but Github may have changed this as in the latest release I downloaded (v 184.108.40.206) the files reside elsewhere and I will share where to find them.
To find your git-bash.exe path try the following:
- Open File Explorer and put %AppData% in the address bar, hit enter.
- It should redirect to something like: C:\Users\Giovanni\AppData\Roaming
- Now change folders from Roaming to Local
- You should now be at: C:\Users\Giovanni\AppData\Local
- Find the Github folder, enter it.
- You should see a list of files and folders, we care about “PortableGit” it has a longer name that just PortableGit, so enter it.
- You will see git-bash.exe in there.
- Go back into Webstorm > Settings > Terminal
- Set your terminal to this new path, in my case: “C:\Users\Giovanni\AppData\Local\GitHub\PortableGit_d7effa1a4a322478cd29c826b52a0c118ad3db11\git-bash.exe”
You’re all set! Webstorm should now be able to launch Github Desktop’s git-bash.exe as the terminal, no additional software required.
There is a gotcha: the terminal window will open separate from Webstorm window, if you want a tab under your code then I suggest to download and install git for windows in addition to Github Desktop.https://git-for-windows.github.io/