Skip to content

Instantly share code, notes, and snippets.

@mh0w
Created October 30, 2024 14:32
Show Gist options
  • Select an option

  • Save mh0w/a694e2b3681e1d34797fa6aca3150e84 to your computer and use it in GitHub Desktop.

Select an option

Save mh0w/a694e2b3681e1d34797fa6aca3150e84 to your computer and use it in GitHub Desktop.
Add git bash to Windows 11 terminal

Make sure the git command runs successfully in Command Prompt. It needs to be in the PATH env var.

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:

        { 
            "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-for-windows.ico",
            "name" : "Git Bash", 
            "padding" : "0, 0, 0, 0", 
            "snapOnInput" : true, 
            "useAcrylic" : true 
        }

The icon can be obtained here: "C:\Program Files\Git\mingw64\share\git\git-for-windows.ico"

You can add icons to this location: %LOCALAPPDATA%\packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState

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

Make sure the Guid is correct and matches the corresponding configurations.

Test that git bash works in Windows Terminal.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment