Jared
Jared

Reputation: 6060

Visual Studio Code: Use Git Bash (windows)

I have found questions that give direction on using Git Bash with full blown Visual Studio, but I've not been able to locate any directions on how one might be able to set the built-in Terminal that Visual Studio Code offers to be Git Bash. Is this possible?

Upvotes: 4

Views: 8829

Answers (3)

Stephen Reichman
Stephen Reichman

Reputation: 71

The accepted answer doesn't answer the original question: How to use git-bash in VS Code.

"terminal.integrated.shell.windows":  "C:\\Git\\bin\\bash.exe"

Just replace the path to the C:\Git folder to the actual path of your git installation.

Upvotes: 7

Mark
Mark

Reputation: 180611

There is this setting for your workspace:

// The path of the shell that the terminal uses on Windows. When using shells shipped with Windows (cmd, PowerShell or Bash on Ubuntu), prefer C:\Windows\sysnative over C:\Windows\System32 to use the 64-bit versions.

"terminal.integrated.shell.windows":  “C:\\Windows\\sysnative\\bash.exe”,

Assuming you already have it installed. I found this info here:

installing and setting up git bash in vscode

Upvotes: 7

mobrienv
mobrienv

Reputation: 209

I'm not sure if setting the built-in terminal to Git Bash is possible. Opening a Git Bash terminal in your projects root directory should suffice.

You can do this by right clicking withing the opened directory and clicking 'Git Bash Here'.

Upvotes: 0

Related Questions