Use Git Bash as Integrated Terminal in VS Code

Posted by in Software, Tutorial

TL;DR:: Install windows git to get bash and add "C:\\Program Files\\Git\\bin\\bash.exe" to "terminal.integrated.shell.windows" in VS Code’s user settings.

As I’m trying my hand at developing a node application today, I’m getting frustrated by the Terminate batch job (Y/N) every time I need to restart a script:

01-git-bash

Since previously I was developing on linux/macOS, I’m used to bash and I figured that it would be nice to have the bash shell in VS Code’s embedded terminal.

One of the painless ways to have bash on your system is to install git for windows (who hasn’t it yet?).

After you’ve got git (and git bash), you need to insert:

in VS Code’s user configuration file (you can use File -> Preferences -> User Settings). Once you have this saved, you can enjoy the new terminal.

02-git-bash

Bonus

If you have Windows 10 and its Linux subsystem, you can use that one:


A little experiment: If you find this post and ad below useful, please check the ad out :-)