How to add Git Bash to Windows Terminal
Update: I have since switched to using zsh on the Windows Terminal for a unified experience across my macOS and Windows machines.
Windows Terminal
Initially released on 3 May 2019, the Windows Terminal offers users a multi-tabbed command-line experience. It can run any Windows terminal emulators in a separate tab. I immediately downloaded the preview version when it first came out after I saw this feature.
By default, Windows Terminal comes with PowerShell, Command Prompt, Azure Cloud Shell and WSL.
I had no idea how to add Git Bash to Windows Terminal, and I searched for a solution. It was only recently when it occurred to me whenever I want to use Git Bash; I am using it standalone. Below is the working steps for me for my future reference.
Adding Git Bash
- Go to settings by pressing
Ctrl + ,
- Click on "Open JSON file"
- Under the
list
array add the following:
{
"guid": "{00000000-0000-0000-ba54-000000000002}",
"name": "Git",
"commandline": "C:/Program Files/Git/bin/bash.exe --login",
"icon": "%PROGRAMFILES%/Git/mingw64/share/git/git-for-windows.ico",
"startingDirectory": "%USERPROFILE%",
"hidden": false
}
- Save the settings.json file
These steps can also be used to add other shell profiles.