> ## Content Index
> Fetch the complete content index at: https://corti.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Using Git Bash with the Microsoft Terminal
- URL: https://corti.com/using-git-bash-with-the-microsoft-terminal/
- Published: 2019-11-07T13:19:42.000Z
- Updated: 2024-08-21T13:55:52.000Z
- Description: This short tutorial shows how to add the Git Bash shell that is part of Git for Windows to the Microsoft Terminal, make it the default…
- Author: Sascha Corti
- Tags: #Migrated-1724248521618, #Import 2024-08-21 15:55

### Using Git Bash with the Windows Terminal

This short tutorial shows how to add the Git Bash shell that is part of Git for Windows to the Windows Terminal, make it the default shell, add it’s color profile and add a “Windows Terminal Here” entry to the Windows Explorer context menu…

First, make sure [Git for Windows](https://git-scm.com/download/win?ref=corti.com) and the [Windows Terminal](https://www.microsoft.com/en-us/p/windows-terminal-preview/9n0dx20hk701?ref=corti.com) are installed. If you use [Chocolatey](https://chocolatey.org/?ref=corti.com), you can simply run the following command from and elevated prompt:choco install git

To get to the settings of the Windows Terminal, select the down-arrow in the tab bar and the “Settings” — or press Ctrl+,

![](https://corti.com/content/images/2024/08/1-78t7qubwyhuh370aaewelq.png)

In settings, add a new element to the “Profiles” section:"profiles" :  
\[  
 {  
 "acrylicOpacity" : 0.75,  
 "background" : "#000000",  
 "closeOnExit" : true,  
 "colorScheme" : "Campbell",  
 "commandline" : "\\"%PROGRAMFILES%\\\\git\\\\bin\\\\bash.exe\\" --login -i -l",  
 "cursorColor" : "#FFFFFF",  
 "cursorShape" : "bar",  
 "fontFace" : "Consolas",  
 "fontSize" : 10,  
 "guid" : "{`00000000-0000-0000-0000-000000012345`}",  
 "historySize" : 9001,  
 "icon" : "%PROGRAMFILES%\\\\git\\\\mingw64\\\\share\\\\git\\\\git-for-windows.ico",  
 "name" : "Git Bash",  
 "padding" : "0, 0, 0, 0",  
 "snapOnInput" : true,  
 "useAcrylic" : true  
 },  
...

Make sure to generate (change the existing) guid to be unique among your profiles. If you want Git Bash to be your default startup-console, set the defaultProfile in globals accordingly:

```
"globals" :  
{ 
  "defaultProfile" : "{00000000-0000-0000-0000-000000012345}",
```

If you want the Git Bash color scheme in Windows Terminal, add the following to:

```
"schemes" :  
[ 
  { 
    "background" : "#000000", 
    "black" : "#0C0C0C", 
    "blue" : "#6060ff", 
    "brightBlack" : "#767676", 
    "brightBlue" : "#3B78FF", 
    "brightCyan" : "#61D6D6", 
    "brightGreen" : "#16C60C", 
    "brightPurple" : "#B4009E", 
    "brightRed" : "#E74856", 
    "brightWhite" : "#F2F2F2", 
    "brightYellow" : "#F9F1A5", 
    "cyan" : "#3A96DD", 
    "foreground" : "#bfbfbf", 
    "green" : "#00a400", 
    "name" : "GitBash", 
    "purple" : "#bf00bf", 
    "red" : "#bf0000", 
    "white" : "#ffffff", 
    "yellow" : "#bfbf00", 
    "grey" : "#bfbfbf" 
  }, 
...
```

…and change “colorScheme” in the profile to “GitBash”:...  
"colorScheme" : "GitBash",  
...

Finally, to add a right-click context menu “Windows Terminal Here” to Windows Explorer, create a new file with “.reg” extension containing:

```
Windows Registry Editor Version 5.00 
 
[HKEY_CLASSES_ROOT\Directory\Background\shell\windowsterminal] 
@="Windows Terminal Here"
```

```
[HKEY_CLASSES_ROOT\Directory\Background\shell\windowsterminal\command] 
@="\"
```

Replace {USERNAME} with the correct folder name in C:\\Users\\ on your machine.

Merge the .reg file with your registry by double-clicking it.

![](https://corti.com/content/images/2024/08/1-pcpuwcsqi1ff3x-0-dat7a.png)