Using Git Bash with PhpStorm

Voice of Reason
Code Complete
Published in
1 min readJul 28, 2017

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

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 https://bobsguides.com/blog.html/2014/10/23/git-bash-inside-phpstorm/ as I found the fastest way to switch the default terminal used by PhpStorm.

So make the switch, just go to:

File -> Default 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\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.

--

--

Voice of Reason
Code Complete

Speaking from underneath my programmer’s hat… behind an observer’s desk