358

I'm trying to add a new terminal (Git Bash) to the new Windows Terminal. However, I can't get it to work.

I tried changing the commandline property in the profiles array to git-bash.exe but no luck.

Does anyone have an idea how to get this to work?

Matze
  • 4,433
  • 4
  • 45
  • 59
Mendy
  • 4,977
  • 4
  • 19
  • 31

11 Answers11

561

Overview

  1. Open settings with ctrl + ,
  2. You'll want to append one of the profiles options below (depending on what version of git you have installed) to the "list": portion of the settings.json file
{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{00000000-0000-0000-ba54-000000000001}",

    "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles
        },
        "list":
        [
            <put one of the configuration below right here>
        ]
    }
}

Profile options

Uncomment correct paths for commandline and icon if you are using:

  • Git for Windows in %PROGRAMFILES%
  • Git for Windows in %USERPROFILE%
  • If you're using scoop
{
    "guid": "{00000000-0000-0000-ba54-000000000002}",
    "commandline": "%PROGRAMFILES%/git/usr/bin/bash.exe -i -l",
    // "commandline": "%USERPROFILE%/AppData/Local/Programs/Git/bin/bash.exe -l -i",
    // "commandline": "%USERPROFILE%/scoop/apps/git/current/usr/bin/bash.exe -l -i",
    "icon": "%PROGRAMFILES%/Git/mingw64/share/git/git-for-windows.ico",
    // "icon": "%USERPROFILE%/AppData/Local/Programs/Git/mingw64/share/git/git-for-windows.ico",
    // "icon": "%USERPROFILE%/apps/git/current/usr/share/git/git-for-windows.ico",
    "name" : "Bash",
    "startingDirectory" : "%USERPROFILE%"
},

You can also add other options like:

{
    "guid": "{00000000-0000-0000-ba54-000000000002}",
    // ...
    "acrylicOpacity" : 0.75,
    "closeOnExit" : true,
    "colorScheme" : "Campbell",
    "cursorColor" : "#FFFFFF",
    "cursorShape" : "bar",
    "fontFace" : "Consolas",
    "fontSize" : 10,
    "historySize" : 9001,
    "padding" : "0, 0, 0, 0",
    "snapOnInput" : true,
    "useAcrylic" : true
}

Notes

  • make your own guid as of https://github.com/microsoft/terminal/pull/2475 this is no longer generated.
  • the guid can be used in in the globals > defaultProfile so you can press you can press CtrlShiftT or start a Windows terminal and it will start up bash by default
"defaultProfile" : "{00000000-0000-0000-ba54-000000000001}",
  • -l -i to make sure that .bash_profile gets loaded
  • use environment variables so they can map to different systems correctly.
  • target git/bin/bash.exe to avoid spawning off additional processes which saves about 10MB per process according to Process Explorer compared to using bin/bash or git-bash

I have my configuration that uses Scoop in https://gist.github.com/trajano/24f4edccd9a997fad8b4de29ea252cc8

Nick Jones
  • 4,235
  • 5
  • 31
  • 43
Archimedes Trajano
  • 22,850
  • 10
  • 113
  • 154
  • 6
    Note that bash.exe is under git\\bin, not directly in the Git directory, unlike git-bash.exe. This tripped me up at first. – Mike Henry Aug 07 '19 at 00:37
  • A `guid` is NOT generated for me on save – qaisjp Sep 16 '19 at 02:03
  • 80
    if you want to add the correct icon, this is what I set the icon field to: `"icon" : "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico"` – Chris Sandvik Sep 30 '19 at 15:01
  • 1
    I actually use a custom icon https://icons8.com/icon/set/console/office but it is a good tip if you want the icon – Archimedes Trajano Sep 30 '19 at 16:20
  • 2
    I was missing the ` -i -l` options for the bash_profile to be loaded. Thanks. – ImAtWar Oct 13 '19 at 09:21
  • 41
    And just to add to the comment from @ChrisSandvik, the icon can also be referenced like this: `"icon" : "%PROGRAMFILES%\\git\\mingw64\\share\\git\\git-for-windows.ico"` – Julian Oct 23 '19 at 09:02
  • Does anyone else have trouble with reverse-i-search (CTRL+R) when doing it like this? It doesn't seem to remember anything i've done. So all i get is from the last "real" git bash session. – Mikael Gidmark Feb 07 '20 at 06:39
  • If you install git just for your user, the relevant paths are: `"commandline" : "\"%LOCALAPPDATA%\\Programs\\Git\\bin\\bash.exe\" -i -l"` and `"icon" : "%LOCALAPPDATA%\\Programs\\Git\\mingw64\\share\\git\\git-for-windows.ico"` – David E Feb 18 '20 at 17:24
  • Do you know how to set it for xterm-256color support? Setup as above, $TERM is cygwin, and only supports 8 color in Windows Terminal. Using the mintty shell, I have it set to xterm-256color and have full 24-bit color support. I'd like to have the same capabilities in Git Bash via Windows Terminal. – oryan_dunn Feb 24 '20 at 16:24
  • 1
    During installation If you select Use Git from Git Bash Only in Adjusting your PATH environment, this json configuration won't work. You should select from the other two options. – Juan Rojas Mar 07 '20 at 23:39
  • I followed the link but didn't see how to generate a guid. – neves Jun 20 '20 at 18:21
  • make up your own, I made up my own just have to follow the pattern – Archimedes Trajano Jun 21 '20 at 06:29
  • @neves Open Powershell and run `new-guid`, it'll spit out a fresh one for you. – matthew-e-brown Jun 23 '20 at 15:03
  • 3
    Something to note is that I have run into issues using `Git\usr\bin\bash.exe`. It seems that the one in the `usr` folder is missing some environment variables. In my case, I was having issues with `git-upload-pack`, required for the deploy command for [`gh-pages`](https://www.npmjs.com/package/gh-pages) on NPM. Instead, using `Git\bin\bash.exe` fixed all my `$PATH` related issues. – matthew-e-brown Jun 23 '20 at 15:05
  • 1
    Note: Just don't use `git\\git-bash.exe` instead use `bash.exe` in `git\\bin` folder. Otherwise `git-bash` will be opened by its own in a separate window. `"commandline":"%PROGRAMFILES%\\git\\bin\\bash.exe", "icon" :"%PROGRAMFILES%\\git\\mingw64\\share\\git\\git-for-windows.ico"` – Tharindu Sathischandra Jul 03 '20 at 01:43
  • I don't understand, it doesn't show up in the list, but everything is right :/ – Ayfri Sep 08 '20 at 19:40
  • 1
    The guid in the settings needs braces around it - the default output from PowerShell's `New-Guid` cmdlet omits them. You can use `(New-Guid).ToString("b") | scb` to copy a fresh guid to the clipboard in the correct format. – Jim Paton Sep 24 '20 at 04:42
  • "..\\git\\bin\\bash.exe" is available on Windows. – hipokito Jan 07 '21 at 17:23
  • My git-bash was installed into AppData\Local so my commandline is C:\\Users\\\\AppData\\Local\\Programs\\Git\\bin\\bash.exe -l -i – phpguru Feb 04 '21 at 20:39
106

There are below things to do.

  1. Make sure your git command can be run successfully in CMD

That means you need to add git to path when install git or add it to system environment later.

enter image description here

  1. Update the config file profile.json

Open Settings, add following snippet inside the word profiles:

        { 
            "tabTitle": "Git Bash",
            "acrylicOpacity" : 0.75, 
            "closeOnExit" : true, 
            "colorScheme" : "Campbell", 
            "commandline" : "C:/Program Files/Git/bin/bash.exe --login", 
            "cursorColor" : "#FFFFFF", 
            "cursorShape" : "bar", 
            "fontFace" : "Consolas", 
            "fontSize" : 12, 
            "guid" : "{14ad203f-52cc-4110-90d6-d96e0f41b64d}", 
            "historySize" : 9001, 
            "icon": "ms-appdata:///roaming/git-bash_32px.ico",
            "name" : "Git Bash", 
            "padding" : "0, 0, 0, 0", 
            "snapOnInput" : true, 
            "useAcrylic" : true 
        }

The icon can be obtained here: git-bash_32px.ico

You can add icons for Tab to this location:

%LOCALAPPDATA%\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState

Put 32x32 PNG/icons in this folder, and then in profile.json you can reference the image resource with the path starting with ms-appdata:// .

Note that, please make sure the Guidis correct and it matches the corresponding correct configs.

  1. Test git bash works well in Windows Terminal

The final result is below: enter image description here

Bravo Yeung
  • 5,112
  • 1
  • 23
  • 35
  • @Mendy FYI, wish it be helpful for you. – Bravo Yeung Aug 06 '19 at 15:40
  • 37
    You can also get the icon from 'C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico' – Mendy Aug 06 '19 at 20:07
  • Thank you for showing that forward slashes work in the commandLine parameter, which makes typing in the command much easier. – Jim Raden Dec 19 '19 at 13:44
  • Is there a way to not have it go straight into /c/windows/system32? – Brooklyn Jan 29 '20 at 22:26
  • Thank you... the marked answer didn't work for me for some reason but this one did. I have my git installed on a different partition so the environment variables were an issue. This answer has less info but is much straight forward on achieving the goal. – Felipe Correa Mar 25 '20 at 05:17
  • The bash was always opening in a new window for me. I fixed it changing the path from `git-bash.exe` to `bin\bash.exe` – neves Jun 20 '20 at 18:27
  • 4
    @Brooklyn add this line: `"startingDirectory": "%USERPROFILE%"` – pratnala Aug 22 '20 at 01:51
  • Hi I found the icon but in the second step, 'settings' do you mean the setting on my laptop or something else? and I can't find 'profiles' file.... – Cecilia Jan 27 '21 at 17:09
  • @Cecilia, settings here means the "Settings" in dropdown list of Windows Terminal (see last screenshot in this answer.) – Bravo Yeung Jan 28 '21 at 01:34
  • @BravoYeung Hi I don't see 'Settings', if I click on the left top corner for my windows cmd, it only have 'Properties' / ''Defaults'/'Edit' etc, am I looking at the wrong terminal? – Cecilia Jan 28 '21 at 10:29
  • @Cecilia Hi, this topic we discussed in this question is Microsoft's new windows terminal (https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701), you used is just the traditional one. So they have different GUI. If you want to open git in the traditional one, you only need to complete step 1 in this answer. – Bravo Yeung Jan 28 '21 at 11:14
  • Hi @BravoYeung Thanks, do you mean I only need to add git bash path to my environment path? Is this the right path? `C:\Program Files\Git\git-bash.exe`? Or `C:\Program Files\Git\bin\git.exe (I also have bash.exe/sh.exe under bin folder)`, when I navigate to my environment variables, I found that I already have 'C:\Program Files\Git\cmd' do I need all of them? – Cecilia Jan 28 '21 at 11:39
  • This is much better! Thanks – Rannie Ollit Mar 12 '21 at 12:26
89

This is the complete answer (GitBash + color scheme + icon + context menu)

1) Set default profile:

"globals" : 
{
    "defaultProfile" : "{00000000-0000-0000-0000-000000000001}",
    ...

2) Add GitBash profile

"profiles" : 
[
    {
        "guid": "{00000000-0000-0000-0000-000000000001}",
        "acrylicOpacity" : 0.75,
        "closeOnExit" : true,
        "colorScheme" : "GitBash",
        "commandline" : "\"%PROGRAMFILES%\\Git\\usr\\bin\\bash.exe\" --login -i -l",
        "cursorColor" : "#FFFFFF",
        "cursorShape" : "bar",
        "fontFace" : "Consolas",
        "fontSize" : 10,
        "historySize" : 9001,
        "icon" : "%PROGRAMFILES%\\Git\\mingw64\\share\\git\\git-for-windows.ico", 
        "name" : "GitBash",
        "padding" : "0, 0, 0, 0",
        "snapOnInput" : true,
        "startingDirectory" : "%USERPROFILE%",
        "useAcrylic" : false        
    },

3) Add GitBash color scheme

"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"
    },  

4) To add a right-click context menu "Windows Terminal Here"

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows terminal here"
"Icon"="C:\\Users\\{YOUR_WINDOWS_USERNAME}\\AppData\\Local\\Microsoft\\WindowsApps\\{YOUR_ICONS_FOLDER}\\icon.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\wt\command]
@="\"C:\\Users\\{YOUR_WINDOWS_USERNAME}\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe\""
  • replace {YOUR_WINDOWS_USERNAME}
  • create icon folder, put the icon there and replace {YOUR_ICONS_FOLDER}
  • save this in a whatever_filename.reg file and run it.
Altin
  • 1,805
  • 2
  • 22
  • 43
  • 3
    Why do you use the MSYS version `Git\\usr\\bin\\bash.exe` instead of Git for Windows's default MINGW version `Git\\bin\\bash.exe`? – Keith Russell Oct 25 '19 at 17:24
  • @KeithRussell I don't know much of the differences but I use what works for me. I think I had installed GitBash for windows to be able to run shell scripts etc. By the way after writing this reply I found a much more comfortable setup so I'm not using the new windows terminal anymore. I'm currently using Atom editor with an integrated command line using the `atom-ide-terminal` package from Qicrosoft with `Git\\usr\\bin\\bash.exe`. Is there any obvious advantage for using `Git\\bin\\bash.exe`? – Altin Oct 25 '19 at 20:27
  • From my experience with MSYS and MinGW in 2015, and my experience with MinGW Git-Bash over this past year, I’d expect most programs run under MSYS Git-Bash to behave the same as under MinGW Git-Bash, but run significantly slower. But I’ve never tried MSYS Git-Bash. – Keith Russell Oct 26 '19 at 14:17
  • 1
    @KeithRussell I haven't really noticed any slow time but if I do later, I may test between them. – Altin Oct 26 '19 at 14:46
  • 3
    Sweet! Simply copied and pasted. Icons work, colors work, perfect. – Corepuncher Dec 04 '19 at 05:52
  • 2
    @KeithRussell I investigated and found https://stackoverflow.com/a/56844443/8874388, and can confirm what it says. `bin\bash.exe` is a tiny 43kb launcher for `usr\bin\bash.exe` (2 mb). Basically like a symlink, just for convenience (the `bin` folder contains bash, sh and git). In other words, there is no difference. I am not sure why they bothered to make the `bin` folder version at all. Perhaps for legacy `PATH` variable reasons (to not infect the path with ls.exe, cat.exe etc too). But yeah, we should be using `usr/bin/bash.exe` to avoid the pointless `bin/bash.exe` wrapper. – Mitch McMabers Dec 06 '19 at 17:01
  • @MitchMcMabers I’m surprised, because my understanding is as recently as five years ago, MSYS and MinGW were different environments. MinGW was basically some programs you could run from a Windows environment, and MSYS was actual (stripped-down) POSIX emulation. And when we experimented with both, we found MSYS was *way* slower for the same operations. (But preferable because you actually had POSIX.) – Keith Russell Dec 06 '19 at 19:26
  • @KeithRussell I am surprised too, because they clearly started out as different things. I did research yesterday and was not able to get a clear understanding of what their relationship is. From what I read, it seems like MinGW and MSYS2 are related to each other these days, but don't quote me on that, because the material I was reading was far from crystal-clear. ;-) That being said, I was able to reproduce the results: Go to Windows Task Manager - Details Tab, start `Git\bin\bash.exe` and you will see 2 `bash.exe` spawn, the latter being `Git\usr\bin\bash.exe` which is launched by the prior. – Mitch McMabers Dec 07 '19 at 17:45
  • 1
    @KeithRussell Also, if you right click the column header in the Windows Task Manager - Details tab, and Select columns, and enable the "Command line" column, you can see that `Git\usr\bin\bash.exe` is started without any extra arguments. So the only potential thing that the `Git\bin\bash.exe` wrapper does is inject environment variables before launching, but I think the only thing it injects is the `$MSYSTEM = MINGW64` variable which causes the PS1 prompt to have a different title, but I doubt it injects anything else, since everything works properly when launching either of the binaries. – Mitch McMabers Dec 07 '19 at 17:54
  • 1
    Also note that `C:\Program Files\Git\usr\bin\bash.exe` does not behave properly (cannot find built-in commands, does not have MSYS title in PS1 prompt) if launched directly, such as via Win+R or via cmd.exe, etc, but it works perfectly if launched via a Terminal host such as the brand new Microsoft Windows Terminal, or the community-project "Alacritty", etc. I am running it through Microsoft Windows Terminal (a kickass new open source project by Microsoft, which provides a fast, GPU-accelerated terminal that can host any shell; I'm using it with Bash + PowerShell 6 + cmd). :-) – Mitch McMabers Dec 07 '19 at 17:57
  • Due to change in `settings.json` in latest version. Step should be more look like following: ``` "profiles": { "defaults": { // Put settings here that you want to apply to all profiles. }, "list": [ { "guid": "{00000000-0000-0000-0000-000000000001}", ... ... ``` – Sourabh May 27 '20 at 14:26
  • 3
    If anyone's unable to open the terminal in the working dir, replace the address in the last line with: `"C:\Users\Hp\AppData\Local\Microsoft\WindowsApps\wt.exe" -d .` – Arif Jul 13 '20 at 10:22
  • 1
    I would add: "suppressApplicationTitle": true to enforce the use of "tabTitle": "GitBash" in settings.json for the GitBash profile. This will ensure that the shell can't override the title that has been set in the config-file. Figured this out when I suddenly got the current path as the title. – user3540325 Apr 25 '21 at 08:59
41

Because most answers either show a lot of unrelated configuration or don't show the configuration, I created my own answer that tries to be more focused. It is mainly based on the profile settings reference and Archimedes Trajano's answer.

Steps

  1. Open PowerShell and enter [guid]::NewGuid() to generate a new GUID. We will use it at step 3.

    > [guid]::NewGuid()
    
    Guid
    ----
    a3da8d92-2f3f-4e36-9714-98876b6cb480
    
  2. Open the settings of Windows Terminal. (CTRL+,)

  3. Add the following JSON object to profiles.list. Replace guid with the one you generated at step 1.

    {
      "guid": "{a3da8d92-2f3f-4e36-9714-98876b6cb480}",
      "name": "Git Bash",
      "commandline": "\"%PROGRAMFILES%\\Git\\usr\\bin\\bash.exe\" -i -l",
      "icon": "%PROGRAMFILES%\\Git\\mingw64\\share\\git\\git-for-windows.ico",
      "startingDirectory" : "%USERPROFILE%"
    },
    

Notes

  • There is currently an issue that you cannot use your arrow keys (and some other keys). It seems to work with the latest preview version, though. (issue #6859)

  • Specifying "startingDirectory" : "%USERPROFILE%" shouldn't be necessary according to the reference. However, if I don't specify it, the starting directory was different depending on how I started the terminal initially.

  • Settings that shall apply to all terminals can be specified in profiles.defaults.

  • I recommend to set "antialiasingMode": "cleartype" in profiles.defaults. You have to remove "useAcrylic" (if you have added it as suggested by some other answers) to make it work. It improves the quality of text rendering. However, you cannot have transparent background without useAcrylic. See issue #1298.

  • If you have problems with the cursor, you can try another shape like "cursorShape": "filledBox". See cursor settings for more information.

JojOatXGME
  • 2,165
  • 1
  • 19
  • 34
17

That's how I've added mine in profiles json table,

{
    "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
}
Martin Brisiak
  • 2,957
  • 12
  • 32
  • 48
Ayoub ELaboussi
  • 345
  • 2
  • 9
11

Another item to note - in settings.json I discovered if you don't use "commandline": "C:/Program Files/Git/bin/bash.exe"

and instead use: "commandline": "C:/Program Files/Git/git-bash.exe"

the Git shell will open up in an independent window outside of Windows Terminal instead of on a tab - which is not the desired behavior. In addition, the tab in Windows Terminal that opens will also need to be closed manually as it will display process exited information - [process exited with code 3221225786] etc.

Might save someone some headache

AB1
  • 121
  • 1
  • 6
  • How do I solve this? I want to "C:/Program Files/Git/git-bash.exe" – Shriram Jul 29 '20 at 14:48
  • I did not use git-bash.exe because of the issues so I cannot assist, unfortunately. – AB1 Jul 30 '20 at 00:37
  • 1
    This is something I came across, guys if you are used to use "C:\Program Files\Git\git-bash.exe", you will have to start using "C:\Program Files\Git\usr\bin\bash.exe". The "\usr\bin" although looks like a Linux one is still there, even though you are on Windows. – hipokito Jan 07 '21 at 17:22
  • 1
    Use C:\Program Files\Git\bash.exe to open in another tab. Thanks! – duyn9uyen Apr 29 '21 at 17:06
8

Change the profiles parameter to "commandline": "%PROGRAMFILES%\\Git\\bin\\bash.exe -l -i"

This works for me and allows for my .bash_profile alias autocomplete scripts to run.

Orbittman
  • 166
  • 5
6

If you want to display an icon and are using a dark theme. Which means the icon provided above doesn't look that great. Then you can find the icon here

C:\Program Files\Git\mingw64\share\git\git-for-windows I copied it into.

%LOCALAPPDATA%\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState

and named it git-bash_32px as suggested above.

Control the opacity with CTRL + SHIFT + scrolling.

        {
            "acrylicOpacity" : 0.75,
            "closeOnExit" : true,
            "colorScheme" : "Campbell",
            "commandline" : "\"%PROGRAMFILES%\\git\\usr\\bin\\bash.exe\" -i -l",
            "cursorColor" : "#FFFFFF",
            "cursorShape" : "bar",
            "fontFace" : "Consolas",
            "fontSize" : 10,
            "guid" : "{73225108-7633-47ae-80c1-5d00111ef646}",
            "historySize" : 9001,
            "icon" : "ms-appdata:///roaming/git-bash_32px.ico",
            "name" : "Bash",
            "padding" : "0, 0, 0, 0",
            "snapOnInput" : true,
            "startingDirectory" : "%USERPROFILE%",
            "useAcrylic" : true
        },
Sigex
  • 2,048
  • 2
  • 18
  • 21
3

The new version of windows terminal can be configured through its GUI.

Setting -> Add new
Under "command line" add the path -> path/to/Git/bin/bash.exe
Mendy
  • 4,977
  • 4
  • 19
  • 31
saveearth
  • 116
  • 3
0

I did as follows:

  1. Add "%programfiles%\Git\Bin" to your PATH
  2. On the profiles.json, set the desired command-line as "commandline" : "sh --cd-to-home"
  3. Restart the Windows Terminal

It worked for me.

0

Adding "%PROGRAMFILES%\\Git\\bin\\bash.exe -l -i" doesn't work for me. Because of space symbol (which is separator in cmd) in %PROGRAMFILES% terminal executes command "C:\Program" instead of "C:\Program Files\Git\bin\bash.exe -l -i". The solution should be something like adding quotation marks in json file, but I didn't figure out how. The only solution is to add "C:\Program Files\Git\bin" to %PATH% and write "commandline": "bash.exe" in profiles.json

Grigoriy
  • 51
  • 5
  • I used `"commandline" : "C:\\PROGRA~1\\Git\\bin\\bash.exe",`. No need to modify my path – PTRK Jul 20 '19 at 17:41
  • This doesn't work for me. It lauches cmd. But if I type `"C:\\PROGRA~1\\Git\\bin\\bash.exe"` in opened terminal window, bash starts. – Grigoriy Jul 22 '19 at 01:26
  • you need an extra set of escaped quote marks around the %PROGRAMFILES%. eg: `"commandline" : "\"%PROGRAMFILES%\\git\\usr\\bin\\bash.exe\" -i -l"` – BJury Oct 18 '19 at 14:24
  • Seems to work fine with forward slashes in configuration while `%PROGRAMFILES%` contains both space and backslashes, like this `"commandline": "%PROGRAMFILES%/Git/bin/bash.exe -i -l"` – cb2 Nov 18 '20 at 06:51