Using Git Bash with PhpStorm

Voice of Reason
Jul 28, 2017 · 1 min read

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.

Code Complete

I talk about all things upon which I dare to have an opinion. My stories may not appear connected but they sure touch on a lot of things that affect me…

Voice of Reason

Written by

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

Code Complete

I talk about all things upon which I dare to have an opinion. My stories may not appear connected but they sure touch on a lot of things that affect me…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade