Windows Terminal with Git Bash #15839

Closed
opened 2026-01-31 04:49:55 +00:00 by claunia · 11 comments
Owner

Originally created by @debanjanpaul10 on GitHub (Nov 11, 2021).

Windows Terminal version (or Windows build number)

1.11.2921.0

Other Software

Git version 2.33.1.windows.1

Steps to reproduce

git

Expected Behavior

Git functions like status, add changes, view tracked and untracked items, push, merge etc

Actual Behavior

Takes more than 5seconds to load. I have an Intel machine with Core i7 10th Gen processor with 16GB Ram and 1TB disk space which is more than the required specs for Windows Terminal to run as well as Git to run with Git Bash. But whenever I open the git bash on windows terminal each and every git action takes a lot of time to load. The performance also drops a lot whenever I am inside a local git repository. Happens sometimes with Powershell on the Windows Terminal but not much.

Originally created by @debanjanpaul10 on GitHub (Nov 11, 2021). ### Windows Terminal version (or Windows build number) 1.11.2921.0 ### Other Software Git version 2.33.1.windows.1 ### Steps to reproduce git <commands> ### Expected Behavior Git functions like status, add changes, view tracked and untracked items, push, merge etc ### Actual Behavior Takes more than 5seconds to load. I have an Intel machine with Core i7 10th Gen processor with 16GB Ram and 1TB disk space which is more than the required specs for Windows Terminal to run as well as Git to run with Git Bash. But whenever I open the git bash on windows terminal each and every git action takes a lot of time to load. The performance also drops a lot whenever I am inside a local git repository. Happens sometimes with Powershell on the Windows Terminal but not much.
Author
Owner

@zadjii-msft commented on GitHub (Nov 11, 2021):

Does this repro with the vintage console host (conhost.exe) as well, or only inside of the Windows Terminal? Is this a regression from a previous Terminal version? Does it happen consistently with every git repo, or one in particular?

@zadjii-msft commented on GitHub (Nov 11, 2021): Does this repro with the vintage console host (`conhost.exe`) as well, or only inside of the Windows Terminal? Is this a regression from a previous Terminal version? Does it happen consistently with every git repo, or one in particular?
Author
Owner

@debanjanpaul10 commented on GitHub (Nov 11, 2021):

No it happens only inside of Windows Terminal. The Terminal Version is updated. It happens with every git repo.

@debanjanpaul10 commented on GitHub (Nov 11, 2021): No it happens only inside of Windows Terminal. The Terminal Version is updated. It happens with every git repo.
Author
Owner

@zadjii-msft commented on GitHub (Nov 11, 2021):

Weird. I literally have no idea why this would only happen with the Terminal. Maybe it's the Terminal being told the working directory by git? But that doesn't really make sense - that's something that you probably had to opt in for, and I certainly wouldn't expect to be a hot path.

Like, this doesn't make sense as something that's only a problem with git commands in the Terminal. Could you share your settings.json file? Maybe there's something in there that's enlightening.

Are you using Magnifier, or Narrator, or some other screen reader perhaps?

@zadjii-msft commented on GitHub (Nov 11, 2021): Weird. I literally have no idea why this would only happen with the Terminal. Maybe it's the Terminal being told the working directory by `git`? But that doesn't really make sense - that's something that you probably had to opt in for, and I _certainly_ wouldn't expect to be a hot path. Like, this doesn't make sense as something that's _only a problem with git commands in the Terminal_. Could you share your [settings.json file](https://github.com/microsoft/terminal/wiki/Frequently-Asked-Questions-(FAQ)#where-can-i-find-the-settings-file)? Maybe there's something in there that's enlightening. Are you using Magnifier, or Narrator, or some other screen reader perhaps?
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Nov 11, 2021):

Maybe there is a difference in PATH or other environment variables.

@KalleOlaviNiemitalo commented on GitHub (Nov 11, 2021): Maybe there is a difference in PATH or other environment variables.
Author
Owner

@debanjanpaul10 commented on GitHub (Nov 12, 2021):

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        }
    ],
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{00000000-0000-0000-ba54-000000000002}",
    "profiles": 
    {
        "defaults": 
        {
            "acrylicOpacity": 0.69999999999999996,
            "colorScheme": "One Half Dark",
            "cursorShape": "filledBox",
            "useAcrylic": true
        },
        "list": 
        [
            {
                "commandline": "powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "commandline": "D:\\Softwares\\Git\\bin\\bash.exe",
                "guid": "{00000000-0000-0000-ba54-000000000002}",
                "icon": "D:/Softwares/Git/mingw64/share/git/git-for-windows.ico",
                "name": "Bash"
            }
        ]
    },
    "schemes": 
    [
        {
            "background": "#0C0C0C",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#012456",
            "black": "#0C0C0C",
            "blue": "#0037DA",
            "brightBlack": "#767676",
            "brightBlue": "#3B78FF",
            "brightCyan": "#61D6D6",
            "brightGreen": "#16C60C",
            "brightPurple": "#B4009E",
            "brightRed": "#E74856",
            "brightWhite": "#F2F2F2",
            "brightYellow": "#F9F1A5",
            "cursorColor": "#FFFFFF",
            "cyan": "#3A96DD",
            "foreground": "#CCCCCC",
            "green": "#13A10E",
            "name": "Campbell Powershell",
            "purple": "#881798",
            "red": "#C50F1F",
            "selectionBackground": "#FFFFFF",
            "white": "#CCCCCC",
            "yellow": "#C19C00"
        },
        {
            "background": "#282C34",
            "black": "#282C34",
            "blue": "#61AFEF",
            "brightBlack": "#5A6374",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B6C2",
            "brightGreen": "#98C379",
            "brightPurple": "#C678DD",
            "brightRed": "#E06C75",
            "brightWhite": "#DCDFE4",
            "brightYellow": "#E5C07B",
            "cursorColor": "#FFFFFF",
            "cyan": "#56B6C2",
            "foreground": "#DCDFE4",
            "green": "#98C379",
            "name": "One Half Dark",
            "purple": "#C678DD",
            "red": "#E06C75",
            "selectionBackground": "#FFFFFF",
            "white": "#DCDFE4",
            "yellow": "#E5C07B"
        },
        {
            "background": "#FAFAFA",
            "black": "#383A42",
            "blue": "#0184BC",
            "brightBlack": "#4F525D",
            "brightBlue": "#61AFEF",
            "brightCyan": "#56B5C1",
            "brightGreen": "#98C379",
            "brightPurple": "#C577DD",
            "brightRed": "#DF6C75",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#E4C07A",
            "cursorColor": "#4F525D",
            "cyan": "#0997B3",
            "foreground": "#383A42",
            "green": "#50A14F",
            "name": "One Half Light",
            "purple": "#A626A4",
            "red": "#E45649",
            "selectionBackground": "#FFFFFF",
            "white": "#FAFAFA",
            "yellow": "#C18301"
        },
        {
            "background": "#002B36",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#FFFFFF",
            "cyan": "#2AA198",
            "foreground": "#839496",
            "green": "#859900",
            "name": "Solarized Dark",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#FDF6E3",
            "black": "#002B36",
            "blue": "#268BD2",
            "brightBlack": "#073642",
            "brightBlue": "#839496",
            "brightCyan": "#93A1A1",
            "brightGreen": "#586E75",
            "brightPurple": "#6C71C4",
            "brightRed": "#CB4B16",
            "brightWhite": "#FDF6E3",
            "brightYellow": "#657B83",
            "cursorColor": "#002B36",
            "cyan": "#2AA198",
            "foreground": "#657B83",
            "green": "#859900",
            "name": "Solarized Light",
            "purple": "#D33682",
            "red": "#DC322F",
            "selectionBackground": "#FFFFFF",
            "white": "#EEE8D5",
            "yellow": "#B58900"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#FFFFFF",
            "cyan": "#06989A",
            "foreground": "#D3D7CF",
            "green": "#4E9A06",
            "name": "Tango Dark",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#FFFFFF",
            "black": "#000000",
            "blue": "#3465A4",
            "brightBlack": "#555753",
            "brightBlue": "#729FCF",
            "brightCyan": "#34E2E2",
            "brightGreen": "#8AE234",
            "brightPurple": "#AD7FA8",
            "brightRed": "#EF2929",
            "brightWhite": "#EEEEEC",
            "brightYellow": "#FCE94F",
            "cursorColor": "#000000",
            "cyan": "#06989A",
            "foreground": "#555753",
            "green": "#4E9A06",
            "name": "Tango Light",
            "purple": "#75507B",
            "red": "#CC0000",
            "selectionBackground": "#FFFFFF",
            "white": "#D3D7CF",
            "yellow": "#C4A000"
        },
        {
            "background": "#000000",
            "black": "#000000",
            "blue": "#000080",
            "brightBlack": "#808080",
            "brightBlue": "#0000FF",
            "brightCyan": "#00FFFF",
            "brightGreen": "#00FF00",
            "brightPurple": "#FF00FF",
            "brightRed": "#FF0000",
            "brightWhite": "#FFFFFF",
            "brightYellow": "#FFFF00",
            "cursorColor": "#FFFFFF",
            "cyan": "#008080",
            "foreground": "#C0C0C0",
            "green": "#008000",
            "name": "Vintage",
            "purple": "#800080",
            "red": "#800000",
            "selectionBackground": "#FFFFFF",
            "white": "#C0C0C0",
            "yellow": "#808000"
        }
    ]
}

This is my settings.json file

@debanjanpaul10 commented on GitHub (Nov 12, 2021): ```jsonc { "$schema": "https://aka.ms/terminal-profiles-schema", "actions": [ { "command": { "action": "copy", "singleLine": false }, "keys": "ctrl+c" }, { "command": "paste", "keys": "ctrl+v" }, { "command": "find", "keys": "ctrl+shift+f" }, { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" } ], "copyFormatting": "none", "copyOnSelect": false, "defaultProfile": "{00000000-0000-0000-ba54-000000000002}", "profiles": { "defaults": { "acrylicOpacity": 0.69999999999999996, "colorScheme": "One Half Dark", "cursorShape": "filledBox", "useAcrylic": true }, "list": [ { "commandline": "powershell.exe", "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "hidden": false, "name": "Windows PowerShell" }, { "commandline": "cmd.exe", "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "hidden": false, "name": "Command Prompt" }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": false, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" }, { "commandline": "D:\\Softwares\\Git\\bin\\bash.exe", "guid": "{00000000-0000-0000-ba54-000000000002}", "icon": "D:/Softwares/Git/mingw64/share/git/git-for-windows.ico", "name": "Bash" } ] }, "schemes": [ { "background": "#0C0C0C", "black": "#0C0C0C", "blue": "#0037DA", "brightBlack": "#767676", "brightBlue": "#3B78FF", "brightCyan": "#61D6D6", "brightGreen": "#16C60C", "brightPurple": "#B4009E", "brightRed": "#E74856", "brightWhite": "#F2F2F2", "brightYellow": "#F9F1A5", "cursorColor": "#FFFFFF", "cyan": "#3A96DD", "foreground": "#CCCCCC", "green": "#13A10E", "name": "Campbell", "purple": "#881798", "red": "#C50F1F", "selectionBackground": "#FFFFFF", "white": "#CCCCCC", "yellow": "#C19C00" }, { "background": "#012456", "black": "#0C0C0C", "blue": "#0037DA", "brightBlack": "#767676", "brightBlue": "#3B78FF", "brightCyan": "#61D6D6", "brightGreen": "#16C60C", "brightPurple": "#B4009E", "brightRed": "#E74856", "brightWhite": "#F2F2F2", "brightYellow": "#F9F1A5", "cursorColor": "#FFFFFF", "cyan": "#3A96DD", "foreground": "#CCCCCC", "green": "#13A10E", "name": "Campbell Powershell", "purple": "#881798", "red": "#C50F1F", "selectionBackground": "#FFFFFF", "white": "#CCCCCC", "yellow": "#C19C00" }, { "background": "#282C34", "black": "#282C34", "blue": "#61AFEF", "brightBlack": "#5A6374", "brightBlue": "#61AFEF", "brightCyan": "#56B6C2", "brightGreen": "#98C379", "brightPurple": "#C678DD", "brightRed": "#E06C75", "brightWhite": "#DCDFE4", "brightYellow": "#E5C07B", "cursorColor": "#FFFFFF", "cyan": "#56B6C2", "foreground": "#DCDFE4", "green": "#98C379", "name": "One Half Dark", "purple": "#C678DD", "red": "#E06C75", "selectionBackground": "#FFFFFF", "white": "#DCDFE4", "yellow": "#E5C07B" }, { "background": "#FAFAFA", "black": "#383A42", "blue": "#0184BC", "brightBlack": "#4F525D", "brightBlue": "#61AFEF", "brightCyan": "#56B5C1", "brightGreen": "#98C379", "brightPurple": "#C577DD", "brightRed": "#DF6C75", "brightWhite": "#FFFFFF", "brightYellow": "#E4C07A", "cursorColor": "#4F525D", "cyan": "#0997B3", "foreground": "#383A42", "green": "#50A14F", "name": "One Half Light", "purple": "#A626A4", "red": "#E45649", "selectionBackground": "#FFFFFF", "white": "#FAFAFA", "yellow": "#C18301" }, { "background": "#002B36", "black": "#002B36", "blue": "#268BD2", "brightBlack": "#073642", "brightBlue": "#839496", "brightCyan": "#93A1A1", "brightGreen": "#586E75", "brightPurple": "#6C71C4", "brightRed": "#CB4B16", "brightWhite": "#FDF6E3", "brightYellow": "#657B83", "cursorColor": "#FFFFFF", "cyan": "#2AA198", "foreground": "#839496", "green": "#859900", "name": "Solarized Dark", "purple": "#D33682", "red": "#DC322F", "selectionBackground": "#FFFFFF", "white": "#EEE8D5", "yellow": "#B58900" }, { "background": "#FDF6E3", "black": "#002B36", "blue": "#268BD2", "brightBlack": "#073642", "brightBlue": "#839496", "brightCyan": "#93A1A1", "brightGreen": "#586E75", "brightPurple": "#6C71C4", "brightRed": "#CB4B16", "brightWhite": "#FDF6E3", "brightYellow": "#657B83", "cursorColor": "#002B36", "cyan": "#2AA198", "foreground": "#657B83", "green": "#859900", "name": "Solarized Light", "purple": "#D33682", "red": "#DC322F", "selectionBackground": "#FFFFFF", "white": "#EEE8D5", "yellow": "#B58900" }, { "background": "#000000", "black": "#000000", "blue": "#3465A4", "brightBlack": "#555753", "brightBlue": "#729FCF", "brightCyan": "#34E2E2", "brightGreen": "#8AE234", "brightPurple": "#AD7FA8", "brightRed": "#EF2929", "brightWhite": "#EEEEEC", "brightYellow": "#FCE94F", "cursorColor": "#FFFFFF", "cyan": "#06989A", "foreground": "#D3D7CF", "green": "#4E9A06", "name": "Tango Dark", "purple": "#75507B", "red": "#CC0000", "selectionBackground": "#FFFFFF", "white": "#D3D7CF", "yellow": "#C4A000" }, { "background": "#FFFFFF", "black": "#000000", "blue": "#3465A4", "brightBlack": "#555753", "brightBlue": "#729FCF", "brightCyan": "#34E2E2", "brightGreen": "#8AE234", "brightPurple": "#AD7FA8", "brightRed": "#EF2929", "brightWhite": "#EEEEEC", "brightYellow": "#FCE94F", "cursorColor": "#000000", "cyan": "#06989A", "foreground": "#555753", "green": "#4E9A06", "name": "Tango Light", "purple": "#75507B", "red": "#CC0000", "selectionBackground": "#FFFFFF", "white": "#D3D7CF", "yellow": "#C4A000" }, { "background": "#000000", "black": "#000000", "blue": "#000080", "brightBlack": "#808080", "brightBlue": "#0000FF", "brightCyan": "#00FFFF", "brightGreen": "#00FF00", "brightPurple": "#FF00FF", "brightRed": "#FF0000", "brightWhite": "#FFFFFF", "brightYellow": "#FFFF00", "cursorColor": "#FFFFFF", "cyan": "#008080", "foreground": "#C0C0C0", "green": "#008000", "name": "Vintage", "purple": "#800080", "red": "#800000", "selectionBackground": "#FFFFFF", "white": "#C0C0C0", "yellow": "#808000" } ] } ``` This is my settings.json file
Author
Owner

@MrStrik3 commented on GitHub (Jan 10, 2022):

I have a very similar issue. When Neovim updates his plugins through "Git for windows", Windows Terminal eats a lot of resources up. I have a high performance laptop and it slows down the whole system. I tried with Alacritty terminal and I got the same kind of behavior. Sounds like a "powershell/git for windows" problem. For a matter of comparison, neovim gets updated in 50ms on linux(wsl) and ~2 minutes on Powershell

image

@MrStrik3 commented on GitHub (Jan 10, 2022): I have a very similar issue. When Neovim updates his plugins through "Git for windows", Windows Terminal eats a lot of resources up. I have a high performance laptop and it slows down the whole system. I tried with Alacritty terminal and I got the same kind of behavior. Sounds like a "powershell/git for windows" problem. For a matter of comparison, neovim gets updated in 50ms on linux(wsl) and ~2 minutes on Powershell ![image](https://user-images.githubusercontent.com/11462170/148774581-77f61254-3398-420c-8f85-cab5007182b6.png)
Author
Owner

@zadjii-msft commented on GitHub (Jan 10, 2022):

Huh, that is interesting, but yea I'd agree that doesn't really look like a Terminal-specific issue.

As far as OP's issue, there's nothing in the settings that looks out of place to me, so I have no idea why the performance would be affected when running in the terminal vs just running D:\\Softwares\\Git\\bin\\bash.exe" directly in conhost. I'll leave this open, but without a solid repro, I'm not sure there's much else we can do on our side... 😕

@zadjii-msft commented on GitHub (Jan 10, 2022): Huh, that is interesting, but yea I'd agree that doesn't really look like a Terminal-specific issue. As far as OP's issue, there's nothing in the settings that looks out of place to me, so I have no idea why the performance would be affected when running in the terminal vs just running `D:\\Softwares\\Git\\bin\\bash.exe"` directly in conhost. I'll leave this open, but without a solid repro, I'm not sure there's much else we can do on our side... 😕
Author
Owner

@Raffaello commented on GitHub (Mar 6, 2022):

just out of the blue, as it looks it spawning a lot of threads.
instead of juts loading bash.exe, try with bash.exe --cd-to-home. I know it looks like a really silly, but the git bash for windows with the legacy console is doing that, so it might be worth a try.

It might have a different bootstrap somehow due to some internals..
worst case won't make it worst anyway! 😄

or even bash --login -i

@Raffaello commented on GitHub (Mar 6, 2022): just out of the blue, as it looks it spawning a lot of threads. instead of juts loading `bash.exe`, try with `bash.exe --cd-to-home`. I know it looks like a really silly, but the git bash for windows with the legacy console is doing that, so it might be worth a try. It might have a different bootstrap somehow due to some internals.. worst case won't make it worst anyway! 😄 or even `bash --login -i`
Author
Owner

@zadjii-msft commented on GitHub (Jun 4, 2024):

Is this still happening/? I feel like if this was more widespread, we'd hear about it every week. Something tells me this was either unique to your setup, or resolved externally 🤷

@zadjii-msft commented on GitHub (Jun 4, 2024): Is this still happening/? I feel like if this was more widespread, we'd hear about it every week. Something tells me this was either unique to your setup, or resolved externally 🤷
Author
Owner

@MrStrik3 commented on GitHub (Jun 9, 2024):

Still a ongoing issue...

@MrStrik3 commented on GitHub (Jun 9, 2024): Still a ongoing issue...
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Jun 13, 2024):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (Jun 13, 2024): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15839