531

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?

4

19 Answers 19

785

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:

Open settings.json in Windows Terminal sidebar

{
    "$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%/scoop/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 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

21
  • 19
    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 7, 2019 at 0:37
  • 91
    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" Sep 30, 2019 at 15:01
  • 4
    I was missing the ` -i -l` options for the bash_profile to be loaded. Thanks.
    – ImAtWar
    Oct 13, 2019 at 9:21
  • 44
    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, 2019 at 9:02
  • 7
    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 on NPM. Instead, using Git\bin\bash.exe fixed all my $PATH related issues. Jun 23, 2020 at 15:05
142

There are below things to do.

  1. Make sure the git command runs successfully in Command Prompt.

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

Run git in Command Prompt

  1. Update the file profile.json: open Settings by pressing Ctrl+, in Windows Terminal, click on Open JSON file in the sidebar, and add following snippet inside the word profiles:

Open settings.json in Windows Terminal sidebar

        { 
            "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 configurations.

  1. Test that git bash works in Windows Terminal.

The final result is below: enter image description here

11
  • @Mendy FYI, wish it be helpful for you. Aug 6, 2019 at 15:40
  • 50
    You can also get the icon from 'C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico'
    – Mendy
    Aug 6, 2019 at 20:07
  • 1
    Is there a way to not have it go straight into /c/windows/system32?
    – Brooklyn
    Jan 29, 2020 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. Mar 25, 2020 at 5:17
  • 6
    @Brooklyn add this line: "startingDirectory": "%USERPROFILE%"
    – pratnala
    Aug 22, 2020 at 1:51
118

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

  1. Set default profile:
"globals": 
{
    "defaultProfile" : "{00000000-0000-0000-0000-000000000001}",
    ...
  1. 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",
        "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
    }
]
  1. 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"
      }
  ]
  1. 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} with your Windows username.
  • Create an icon folder, put the icon there and replace {YOUR_ICONS_FOLDER} with your icon folder.
  • Save this in a .reg file and run it.
16
  • 4
    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? Oct 25, 2019 at 17:24
  • 1
    @KeithRussell I haven't really noticed any slow time but if I do later, I may test between them.
    – Altin
    Oct 26, 2019 at 14:46
  • 4
    Sweet! Simply copied and pasted. Icons work, colors work, perfect. Dec 4, 2019 at 5:52
  • 2
    @KeithRussell I investigated and found 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. Dec 6, 2019 at 17:01
  • 4
    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, 2020 at 10:22
101

It's Sept 2021, thankfully the latest Git Installation installer for Windows (mine was using 2.33.0.2) already has this option covered for us, for the sake of our laziness (and convenience, of course!)

Please install the Windows Terminal first before installing Git, although I haven't try the otherway around, but better follow the sensible order. If the installation order is not the case, please let me know to update this answer.

You may find this handful checkbox at the bottom within the installation stage Select Components, just tick the box there and you're good to go. enter image description here

The settings.json file will be added the Git Bash profile automatically with correct Git Bash icon. My generated Git Bash profile is pretty standard and minimal.

{
    "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
    "hidden": false,
    "name": "Git Bash",
    "source": "Git"
}

If Windows Terminal is running, close and launch again for the Git Bash option to be visible.

1
  • 15
    This is the best current answer.
    – FarhadGh
    Mar 19, 2022 at 13:40
59

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.

0
36

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
}
2
  • 4
    This is short and the best answer here! Feb 8, 2021 at 14:42
  • 2
    I needed to generate a new Guid first (open powershell > [guid]::NewGuid() ) and use it instead of the one above! But except this its works fine :)
    – snukone
    Mar 2, 2021 at 21:53
20

In case anyone is looking for a UI-Based solution. Here it is:

  1. Go to the Terminal's settings.

  2. At the Right buttom side, look for the "Add new profile" option. Screenshot for the Terminal's settings.

  3. Select "New Empty Profile"

  4. Now complete the fields with the information about your bash. If your installation locations are the default ones, you could use these:

  • Name: Git-Bash
  • Command line: C:\Program Files\Git\bin\bash.exe
  • Startin directory: [Leave as default]
  • Icon: C:\Program Files\Git\mingw64\share\git\git-for-windows.ico
  • Tab title: Git-Bash Temrinal Settings completed You could also browse for the right files in case you need to.
  1. Hit Save button.

Final Result

Final Result. Bash terminal

2
  • Thanks so much for this. Way simpler than other solutions!
    – Sanchez333
    Jul 28, 2022 at 9:46
  • Thanks a lot! Very simple and straightforward Apr 25 at 12:27
14

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

4
  • How do I solve this? I want to "C:/Program Files/Git/git-bash.exe"
    – Shriram
    Jul 29, 2020 at 14:48
  • I did not use git-bash.exe because of the issues so I cannot assist, unfortunately.
    – AB1
    Jul 30, 2020 at 0: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 7, 2021 at 17:22
  • 1
    Use C:\Program Files\Git\bash.exe to open in another tab. Thanks!
    – duyn9uyen
    Apr 29, 2021 at 17:06
12

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.

0
9

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
1
  • Most answers are correct here. This was the quickest one. Also don't forget to add bash icon and starting directory. Oct 7, 2021 at 9:29
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
        },
2

As far as I know from my current windows terminal version 1.15.2874.0, you can get what you want with a simple manual click to configure it. The prerequisites are

  1. your git bash client is installed.
  2. at least windows terminal version 1.15.2874.0 or higher.

Then complete the setup by following these steps.

  1. Open windows terminal and find "Settings" in the drop-down list in the top right corner of the menu bar (or use the shortcut ctrl+,);
  2. Click on "Add new profile" at the bottom of the left hand column, then the settings template screen will pop up automatically.
  3. interactive mouse click you want to set the "name", "executable path command line", "startup directory", "icon" value. For example, I set mine to "gitBash", "C:\Program Files\Git\bin\bash.exe", "%USERPROFILE%", and "%USERPROFILE%" in order of customisation. "C:\Program Files\Git\mingw64\share\git\git-for-windows.ico".
  4. save.

The following screenshots are for reference. enter image description here

enter image description here

1

Linux guy, here, sorry I am late; I am just installing git-bash for the first time and looking into what its command should be in Windows Terminal.

As far as I know

  • Cygwin is not Windows, but it provides a POSIX translation layer (cygwin*.dll) so that all those non-Windows executables can run. Even when a new computer program is compiled and built with cygwin, it still turns out a non-Windows executable and it still needs cygwin*.dll to run.
  • MSYS2 is mostly Windows with only a few tools that are probably difficult to port remaining non-Windows and requiring a POSIX translation layer to run (msys*.dll); but, most programs are actually Windows native executables. Even when a new computer program is compiled and built, it is my understanding that turns out a Windows native *.exe.

But I still don't know how important it is that some of these MSYSTEM* and MINGW* environment variables be set or not, when I am going to be using MINGW compiler, anyway.

I did notice that, throughout this thread, both command lines keep showing up, namely, ./bin/bash and ./usr/bin/bash; so, I went ahead and launched them to compare their environments...they can turn out rather different.

Let it be known that, PREVIOUS to launching any of the shells below, I already have C:\Git\mingw64\bin and C:\Git\usr\bin as part of System variable PATH; I do this because I want to have the ability to use bash commands directly from CMD. But I don't think this does anything to the results below.

                                        c:\Git\bin\bash.exe --login     c:\Git\usr\bin\bash.exe --login
Environment Variable    c:\Git\bin\bash.exe                     c:\Git\usr\bin\bash.exe
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EXEPATH                 c:\git\bin      c:\git\bin              n       n
HOSTNAME                n               MDXXXXXX                n       MDXXXXXX
MINGW_CHOST             n               x86_64-w64-mingw32      n       n
MINGW_PACKAGE_PREFIX    n               mingw-w64-x86_64        n       n
MINGW_PREFIX            n               /mingw64                n       n
MSYSTEM_CARCH           n               x86_64                  n       x86_64
MSYSTEM_CHOST           n               x86_64-w64-mingw32      n       x86_64-pc-msys
MSYSTEM_PREFIX          n               /mingw64                n       /usr
MSYSTEM                 MINGW64         MINGW64                 n       MSYS
PLINK_PROTOCOL          ssh             ssh                     n       n
SHELL                   n               /usr/bin/bash           n       /usr/bin/bash
TMPDIR                  n               /tmp                    n       /tmp

ORIGINAL_PATH           n               y                       n       y
ORIGINAL_TEMP           n               y                       n       y
ORIGINAL_TMP            n               y                       n       y
PATH                    /mingw64/bin:/usr/bin:$HOME/bin:$PATH
PATH                                    $HOME/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:$HOME/bin:$PATH
PATh                                                            $PATH
PATH                                                                    $HOME/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:$PATH

So, for good measure, it looks to me as if the more correct thing would be to use ./bin/bash --login; but I at this very moment, I am not sure what the difference will be, say, when it comes to actually compiling a brand new program with MINGW64/GCC; we shall see.

1

Now Terminal has the option to add a new profile, without modifying the settings JSON.

Go to "Settings" from the dropdown menu as shown below.

enter image description here

Under the "Profiles" section in the sidebar, select "Add a new profile". Click on "+New empty profile". The following screen opens up.

enter image description here

Add the details as shown in the below screen for git bash or any other bash.

enter image description here

Thats all!

1

As of Git For Windows 2.42.0 or later, which came out in Aug. 2023 I believe, you can now just re-run the installer and check the box for (NEW!) Add a Git Bash Profile to Windows Terminal, as shown in blue here in the Git 2.42.0 setup:

enter image description here

That's it!

I first documented that in my instructions here: for other recommended settings to choose while installing Git for Windows, see my personal installation instructions here: Installing Git For Windows.

At the bottom of that, I have a section titled Fix the ~ (HOME) dir in Git Bash, if necessary, which you may need too if echo ~ doesn't show your proper HOME directory.

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

4
  • I used "commandline" : "C:\\PROGRA~1\\Git\\bin\\bash.exe",. No need to modify my path
    – PTRK
    Jul 20, 2019 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, 2019 at 1: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, 2019 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, 2020 at 6:51
0

To anyone who may suffer from missing bash history:
in already opened git bash, try initiate another bash - that supposed to load your profile if env vars are properly configured

If this is your case, you can automate it by adding following command line on startup:

C:\progra~1\git\usr\bin\bash.exe --login -l -i -c /c/progra~1/git/usr/bin/bash.exe
0

Adding the bellow code to the setting.json will solve the problem.

If you have checked the add to windows terminal option when installing the git and you can see the git bash option in the "duplicate a profile" options.

It will work as I was also facing a similar problem.

{
    "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
    "hidden": false,
    "name": "Git Bash",
    "source": "Git"
}
1
  • 1
    Thank you for your interest in contributing to the Stack Overflow community. This question already has quite a few answers—including one that has been extensively validated by the community. Are you certain your approach hasn’t been given previously? If so, it would be useful to explain how your approach is different, under what circumstances your approach might be preferred, and/or why you think the previous answers aren’t sufficient. Can you kindly edit your answer to offer an explanation? Jul 27 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.