How to Configure Git Bash With Visual Studio Code

John Wachira Feb 02, 2024
How to Configure Git Bash With Visual Studio Code

This article outlines the steps to configure Git Bash with Visual Studio Code on Windows. By default, VSCode uses PowerShell as the integrated terminal.

We can configure VSCode to use Git Bash as the integrated terminal. Make sure you have Git Bash, and VSCode installed on your machine.

Configure Git Bash With Visual Studio Code

As we mentioned earlier, VSCode uses PowerShell as the default terminal. We will open VSCode and open the terminal with Ctrl+`.

Open terminal in vscode

As seen in the image above, our default terminal is PowerShell. To change this, we will use the Ctrl+Shift+P keyboard short-cut to open the command palette.

Select Default Profile

Then search for Select Default Profile and choose Git Bash from the list.

Select Git Bash

Your default terminal should be Git Bash after these steps. Delete the PowerShell instance and restart the terminal using the Ctrl+` keyboard shortcuts.

Restart terminal in vscode

The new terminal is now Git Bash. You can switch between different terminals from the dropdown list on the terminal tab, as shown below.

Git Bash is now the default

Now, Git Bash is our default terminal, but we can switch to PowerShell temporarily on the menu above.

Author: John Wachira
John Wachira avatar John Wachira avatar

John is a Git and PowerShell geek. He uses his expertise in the version control system to help businesses manage their source code. According to him, Shell scripting is the number one choice for automating the management of systems.

LinkedIn

Related Article - Git Bash