Add Git Bash to Windows Terminal

Add Git Bash Windows Terminal

Let’s look at how to add Git Bash to Windows Terminal in just a few steps.


Let’s begin!

🎥 Want to watch a video to supplement your reading? Check this out:


Add Git Bash to Windows Terminal

Open up Windows Terminal.

Press down CTRL + , (comma) or click the dropdown arrow to open the Settings.

Windows Terminal Settings


Next, click Add a new profile.

Windows Terminal Add New Profile


Click the New empty profile button.

Windows Terminal Create New Empty Profile

Name the profile Git Bash, or any suggestive name you’d like.

Set the executable Git path to C:\Program Files\Git\bin\bash.exe in the Command Line section.

Your path may be different, depending on where you installed Git.

⚠️In any case, make sure to choose the executable file from the bin folder!

Set the starting directory to %USERPROFILE% or any directory you’re using the most.

Set the path to the icon to C:\Program Files\Git\mingw64\share\git\git-for-windows.ico

Set the Title Tab to Git Bash (not visible in the picture) or any suggestive name you’d like.

Press Save when you are done.

Add Git Bash to Windows Terminal configuration

Try it

Now you are ready to test it out!

Open the Git Bash window by clicking the dropdown arrow and then Git Bash or by using the CTRL + SHIFT + 6 hotkey.

try out Git Bash in Windows Terminal

Congrats! 🥳

We have successfully added Git Bash to Windows Terminal!

Git Bash integrated in Windows Terminal


Set Git Bash as Default Terminal

If you had the curiosity of opening a new terminal by pressing the + icon you are probably now disappointed that Git Bash wasn’t the one that popped up.

That’s because the Git Bash profile we just created was not set as the default profile.

Let’s fix that!

Go back to Settings -> Startup -> Default Profile and select Git Bash as the default profile.

Set GIt Bash as Default profile in Windows Terminal

Add Git Bash to Windows Terminal via settings.json

You can add Git Bash to Windows Terminal via the settings.json file.

Click the cog icon at the bottom left of the screen where it says Open JSON file.

Or you can access the path directly C:\Users\YOUR_USER\AppData\Local\Packages\Microsoft.WindowsTerminal_<SOME_HASH>\LocalState\settings.json

Windows Terminal add Git Bash via settings.json file

Open the file with your favorite text editor and add the following chunk of code inside {} profiles > [] list > {} object.

Add Git Bash to Windows Terminal via settings.json file

We went through all of this and now you tell me there was a simpler way?

Well, not really.

You still have to replace the guid with your own and that can be found only by checking the Windows Registry which in itself is not a pleasant thing to do.

Still, it’s a faster way of adding Git Bash to Windows Terminal if you already know the guid in advance.

That was it! 🎉

Let me know what you think about this article in the comments section below.

If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.   
Spread the love

You may also like...