Add Git-Bash to the new Windows Terminal

December 08, 2019

I installed the new Windows Terminal (Preview) from the Microsoft Store over the weekend. It allows you to create tabs for all variety of shells. By default the list of options are Windows Powershell, cmd and Azure Cloud Shell.

tab options

I’ve been using Git-Bash which is installed part of Git for Windows so I’d like to add this to the list and set is as the default shell.

Open settings with Ctrl+, or via the wee down arrow. This will open profiles.json in your preferred text-editor.

Add the following to the profiles []. Set the guid to whatever you like, as long as it’s unique.

   "guid": "{abc00000-0000-0000-0000-000000000000}",
   "name": "Git-Bash",
   "commandline": "%PROGRAMFILES%\\Git\\bin\\bash.exe",
   "icon": "%PROGRAMFILES%\\Git\\mingw64\\share\\git\\git-for-windows.ico",
   "startingDirectory" : "~"

To set Git-Bash as the default over Powershell, replace the default profile value with your Git-Bash guid.

"defaultProfile" : "{abc00000-0000-0000-0000-000000000000}",

Save profile.json and Terminal should display Git-Bash in the choice of tabs.

tab options with Git-Bash

Duncan McDougall is freelance web developer from Annan, Scotland.
LinkedIn GitHub Twitter