4

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?

3 Answers 3

7

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

Sign up to request clarification or add additional context in comments.

Comments

7

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.

Comments

0

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'.

1 Comment

it's possible and works great. Git Bash opens in the selected directory as would be expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.