1. Install Git from https://git-scm.com/download/win

  2. Open Visual Studio Code and press and hold Ctrl + ` to open the terminal.

  3. Open the command palette using Ctrl + Shift + P.

  4. Type - Select Default Profile

  5. Select Git Bash from the options

  6. Click on the + icon in the terminal window

  7. The new terminal now will be a Git Bash terminal. Give it a few seconds to load Git Bash

  8. You can now toggle between the different terminals as well from the dropdown in terminal.

Answer from Himanshu on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › terminal › shell-integration
Terminal Shell Integration
November 3, 2021 - # Output the executable's path first: code --locate-shell-integration-path bash # Add the result of the above to the source statement: [[ "$TERM_PROGRAM" == "vscode" ]] && . "/path/to/shell/integration/script.sh" When using shell integration, it has a "quality" associated with it that declares the capabilities of it.
Top answer
1 of 16
704
  1. Install Git from https://git-scm.com/download/win

  2. Open Visual Studio Code and press and hold Ctrl + ` to open the terminal.

  3. Open the command palette using Ctrl + Shift + P.

  4. Type - Select Default Profile

  5. Select Git Bash from the options

  6. Click on the + icon in the terminal window

  7. The new terminal now will be a Git Bash terminal. Give it a few seconds to load Git Bash

  8. You can now toggle between the different terminals as well from the dropdown in terminal.

2 of 16
427

You no longer need to type in bash.exe path manually. This answer is deprecated. Now you can switch to bash directly, if you have git installed in the default path. If you installed git to a different path you need to use the below solution.


Install Git from https://git-scm.com/download/win.

Then open Visual Studio Code and open the command palette using Ctrl + Shift + P. Then type "open user setting", and then select "Open User Settings" from the drop down menu.

Then this tab will open up with default settings on left and your settings on the right:

Now copy this line of code to your own settings page (the pane on the right hand side) and save - "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"

Note: "C:\\Program Files\Git\bin\bash.exe" is the path where the bash.exe file is located from the Git installation. If you are using the Windows Subsystem for Linux (WSL) Bash shell, the path would be "C:\Windows\System32\bash.exe"

Now press Ctrl + ` to open up the terminal from Visual Studio Code. And you will have Bash -

Discussions

Making git bash terminal available in vs code 👌
Hmm git bash is available in VS Code terminal by default, no plugin necessary. You can have different shells there, PowerShell, cmd and also git bash, if git you have git for Windows installed. More on reddit.com
🌐 r/vscode
2
0
November 14, 2024
[Q] How to run bash commands in vscode terminal?
I think you should not look for how to solve it and instead take the time to look for why it doesn’t work that way. https://learn.microsoft.com/en-us/windows/terminal/ More on reddit.com
🌐 r/vscode
3
2
August 10, 2023
Bash don't work inside VS Code, cannot type 'Shell integration failed to activate'
Does this issue occur when all extensions are disabled?: Yes VS Code Version: latest OS Version: Linux Mint 20 My Bash shell is not working inside VS Code, I simply cannot type anything when I'... More on github.com
🌐 github.com
5
December 7, 2023
Git and VSCode: Setting up the git bash in the terminal without git in System Variables
You want to modify PATH in the command line. For bash it is by adding to the PATH in ~/.bashrc aka C:\Users\YourName.bashrc if the file already exists add to it. You will need to use bash syntax and be careful about escaping properly More on reddit.com
🌐 r/git
2
0
May 10, 2024
🌐
GeeksforGeeks
geeksforgeeks.org › git › how-to-integrate-git-bash-with-visual-studio-code
How to Integrate Git Bash with Visual Studio Code? - GeeksforGeeks
July 15, 2025 - It provides tools for a user to ... To download and install prior downloaded and install Git Bash while VSCode from its official website. Seamless Version Control: Access Git commands directly within your editor....
🌐
Medium
medium.com › @mashiyathussain2 › how-to-integrate-git-bash-with-visual-studio-code-in-windows-c91266995c14
How To Integrate Git bash With Visual Studio Code in Windows | by MASHIYAT HUSSAIN | Medium
February 4, 2020 - How To Integrate Git bash With Visual Studio Code in Windows Follow some steps to integrate Git bash with Visual Studio. Step 1:- Install git from GIT. Step 2:- Install Visual Studio Code. Step 3:- …
🌐
Visual Studio Code
code.visualstudio.com › docs › terminal › basics
Terminal Basics
November 3, 2021 - To get the development tools on the $PATH, VS Code will launch a bash login shell on startup. This means that your ~/.bash_profile has already run and when an integrated terminal launches, it will run another login shell, reordering the $PATH potentially in unexpected ways.
🌐
YouTube
youtube.com › watch
How to integrate Git Bash in vscode (Visual Studio Code) | 5-Minute DevOps - YouTube
Visual Studio Code Terminals Configuration: Tutorial Video explains the steps on how to integrate Git Bash with vscode (Visual Studio Code). The vscode IDE f...
Published   June 2, 2021
🌐
Neutron Dev
neutrondev.com › vs-code-integrate-git-bash-default-terminal
VS Code Integrate Git Bash as Default Terminal - Neutron Dev
October 20, 2023 - The easiest way is to press down CTRL + SHIFT + P and then type in “select default profile“. The drop-down includes every shell that is installed in your system that VS Code was able to detect.
Find elsewhere
🌐
Reddit
reddit.com › r/vscode › making git bash terminal available in vs code 👌
r/vscode on Reddit: Making git bash terminal available in vs code 👌
November 14, 2024 -

I finally found a plugin which makes git bash availablein vsvode terminal on Windows, i always found it a bit frustrating switching between vs code and git bash "external window" when interfering with git. The reason why im so thrilled about this is now I have auto complete avalible directly in vs code :D I will be alt + tabbing way less. I just wanted to share this since i figured some of you guts also would benefit from this!

Thanks to our dude McCarter

https://marketplace.visualstudio.com/items?itemName=McCarter.start-git-bash&ssr=false#overview

🌐
YouTube
youtube.com › neutron dev
VS Code — Integrate Git Bash as Default Terminal - YouTube
Let's quickly have a look at 3 ways we can use to set Git bash as the default integrated terminal in Visual Studio Code.Article: https://neutrondev.com/vs-co...
Published   March 13, 2022
Views   114K
🌐
Danielpadua
blog.danielpadua.dev › posts › git-bash-with-vscode
Git-bash with vscode - Daniel Padua Blog
A blog containing technology and programming posts focused on .net and java natively written in english and portuguese
🌐
DEV Community
dev.to › simbo1905 › how-to-integrate-git-bash-with-visual-studio-code-on-windows-3217
How to integrate Git Bash with Visual Studio Code on Windows - DEV Community
January 10, 2020 - The great thing about this approach is that you don't have to switch to a separate Bash Windows. The embedded terminal runs inside of VS Code and starts in the correct folder on disk. VS Code will filter the terminal output looking for file paths like ./server.js and it will turn them into hyperlinks. Ctrl+Click on them and it will open the file within the main editor panel!
🌐
GitHub
github.com › microsoft › vscode-docs › blob › main › docs › terminal › shell-integration.md
vscode-docs/docs/terminal/shell-integration.md at main · microsoft/vscode-docs
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path bash)" The above shell integration installation is cross-platform and compatible with any installation type if code is in the $PATH. However, this recommended approach starts Node.js to fetch the script path, leading to a slight delay in shell startup.
Author   microsoft
🌐
LinkedIn
linkedin.com › pulse › integrating-git-bash-vscode-windows-mirian-ejerenwa
Integrating Git bash into VSCode on Windows
October 10, 2020 - As my machine crashed and I had to get a new device setup for work, I realized the many things we take for granted once we are setup! I was trying to setup my bash terminal to be integrated with VSCode, but ran into so many different scenarios that did not produce the desired result. I went through
🌐
Reddit
reddit.com › r/vscode › [q] how to run bash commands in vscode terminal?
r/vscode on Reddit: [Q] How to run bash commands in vscode terminal?
August 10, 2023 -

I'm on a Windows machine and cannot get my vscode terminal to run bash commands. Really all I want is to run a .txt or .sh that has presets for my argparser in Python, but doing things like sh my_file.sh or my_file.sh or bash my_file.sh all have not worked. I've googled about it but none of the answers have been successful. I was reading that I might need to install bash to my anaconda environment? Or alternatively download some thing that lets the Windows terminal become a Ubuntu terminal?

What's the best/easiest way to either be able to run bash commands in vscode terminal, or alternatively if there is a way to accomplish this without using bash (I think I could technical copy and paste my entire argparser and all the added args and just have different files with different defaults hardcoded...).

🌐
YouTube
youtube.com › watch
Integrate git bash with VS Code - YouTube
Make Github Repo Contribution easy by integrating git bash with VS Code00:00 Download and Install VS Code and Git01:30 Increase Font Size of Git Bash02:19 In...
Published   June 13, 2023
🌐
DEV Community
dev.to › andrewriveradev › how-to-set-git-bash-as-integrated-terminal-in-vscode-2k31
How to set Git Bash as integrated terminal in VSCode in 2021 - DEV Community
May 23, 2021 - #vscode #webdev #bash · "terminal.integrated.profiles.windows": { "PowerShell": { "source": "PowerShell", "icon": "terminal-powershell" }, "Command Prompt": { "path": [ "${env:windir}\\Sysnative\\cmd.exe", "${env:windir}\\System32\\cmd.exe" ], "icon": "terminal-cmd" }, "GitBash": { "path": ["C:\\Program Files\\Git\\bin\\bash.exe"], "source": "Git Bash", "icon": "terminal-bash" }, "terminal.integrated.defaultProfile.windows": "GitBash", As of April 2021 "terminal.integrated.shell.windows" is deprecated in VSCode.
🌐
GitHub
github.com › microsoft › vscode › issues › 200231
Bash don't work inside VS Code, cannot type 'Shell integration failed to activate' · Issue #200231 · microsoft/vscode
December 7, 2023 - My Bash shell is not working inside VS Code, I simply cannot type anything when I'm inside VS Code but I can when I open the terminal outside VS Code. This happened after I installed Node's version 20 and took the latest version of VS Code. In the info bar in the terminal icon when hovered it shows "Shell integration failed to activate"
Author   3mper0r
🌐
Delft Stack
delftstack.com › home › howto › git › add git bash to vscode
How to Configure Git Bash With Visual Studio Code | Delft Stack
March 4, 2025 - This article outlines the steps necessary to configure Git Bash with Visual Studio Code on Windows. Learn how to enhance your coding experience by integrating Git Bash as your default terminal in VS Code, streamlining your workflow and improving productivity.