Using Git Bash with PhpStorm

This morning I felt there should be more to the terminal in JetBrain’s PHPStorm IDE and it turns out I was right.

image info

Full disclosure, I’ve come to prefer the *nix style command line interface to Windows and that’s reflected in my choice to continue using Git Bash on my work PC (it’s a Lenovo Thinkpad with 64-bit Windows 10).

So, back to the subject of this post, I did a bit of googling and full credit to this guide for showing me the fastest way to switch the default terminal used by PhpStorm.

So make the switch, just go to:

File -> Settings -> Tools -> Terminal

Once here, change the “Shell Path” to:

"C:\Program Files\Git\bin\sh.exe" -login -i

For a 32-bit system, use:

"C:\Program Files (x86)\Git\bin\sh.exe" -login -i

or the equivalent path to your git-shell installation.

The -login switch informs the program to run it’s configuration files and the -i switch informs the program that you want the interactive mode.

Thankfully, I won’t need to scratch my head searching for this anymore.