Skip to content

Instantly share code, notes, and snippets.

@zevolution
Last active November 24, 2021 12:04
Show Gist options
  • Save zevolution/1d69dfd84c3c13bdd5649a78df61e1e6 to your computer and use it in GitHub Desktop.
Save zevolution/1d69dfd84c3c13bdd5649a78df61e1e6 to your computer and use it in GitHub Desktop.
Add Git-Bash on Windows Terminal

Git-Bash on Windows Terminal

Open windows terminal and go to Settings and Open JSON File. You should add code below in object profiles.list.

{
  "guid": "{aeddef2b-82be-4f04-b8e9-de088df5d554}",
  "hidden": false,
  "name": "Git Bash",
  "commandline": "\"%LOCALAPPDATA%\\Programs\\Git\\usr\\bin\\bash.exe\" -i -l", # Change to your git local installation
  "icon": "%LOCALAPPDATA%\\Programs\\Git\\mingw64\\share\\git\\git-for-windows.ico", # Change to your git local installation
  "startingDirectory": "%USERPROFILE%"
}

Example showing also how to set as default:

    "profiles":
    {
        "defaults":
        {
        },
        "list":
        [
            {
                // Make changes here to the powershell.exe profile.
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                "guid": "{aeddef2b-82be-4f04-b8e9-de088df5d554}",
                "hidden": false,
                "name": "Git Bash",
	    	"commandline": "\"%LOCALAPPDATA%\\Programs\\Git\\usr\\bin\\bash.exe\" -i -l",
	    	"icon": "%LOCALAPPDATA%\\Programs\\Git\\mingw64\\share\\git\\git-for-windows.ico",
	    	"startingDirectory": "%USERPROFILE%"
            }
	]
    },
    "defaultProfile": "{aeddef2b-82be-4f04-b8e9-de088df5d554}" # With this property you can set as default
    ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment