Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Add Git Bash to Windows Terminal

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

Prerequisites

  • Windows Terminal – download from the Microsoft Windows Apps website or Microsoft Store
  • Git Bash – download here

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.

Next, click Add a new profile.

Click the New empty profile button.


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.

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.

Congrats!

We have successfully added Git Bash to 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.

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_\LocalState\settings.json


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

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 through comments below, or on Twitter at @pelu_carol.

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.



This post first appeared on Neutron Dev, please read the originial post: here

Share the post

Add Git Bash to Windows Terminal

×

Subscribe to Neutron Dev

Get updates delivered right to your inbox!

Thank you for your subscription

×