Using git bash in windows terminal can't cd into a git project folder!!! #17303

Closed
opened 2026-01-31 05:38:21 +00:00 by claunia · 5 comments
Owner

Originally created by @NotGeekAtAll on GitHub (Apr 21, 2022).

Windows Terminal version

1.13.10983.0(windows terminal preview)

Windows build number

21H2(19044.1645)

Other Software

  • git version 2.35.1.windows.2,git bash
  • zsh 5.8 (x86_64-pc-msys)

Steps to reproduce

  1. git clone some project
  2. window termial use git bash
  3. cd the project you just cloned

Expected Behavior

cd into the project folder correctly

Actual Behavior

  • As you can see, bizplat-ui is a project using git version control,but I can't cd into the project folder,and terminal has no responding.

image

  • But when I just use git bash, I can cd into project folder correctly.

image

  • my windows terminal git bash config

image

Originally created by @NotGeekAtAll on GitHub (Apr 21, 2022). ### Windows Terminal version 1.13.10983.0(windows terminal preview) ### Windows build number 21H2(19044.1645) ### Other Software - git version 2.35.1.windows.2,git bash - zsh 5.8 (x86_64-pc-msys) ### Steps to reproduce 1. git clone some project 2. window termial use git bash 3. cd the project you just cloned ### Expected Behavior cd into the project folder correctly ### Actual Behavior - As you can see, bizplat-ui is a project using git version control,but I can't cd into the project folder,and terminal has no responding. ![image](https://user-images.githubusercontent.com/16792509/164364861-772131a1-537a-4166-b903-3e0a717fa88d.png) - But when I just use git bash, I can cd into project folder correctly. ![image](https://user-images.githubusercontent.com/16792509/164365805-a856d34f-d5a6-4986-b62f-0228c1f30969.png) - my windows terminal git bash config ![image](https://user-images.githubusercontent.com/16792509/164365416-84398f1a-c21a-4e91-87ac-852d24ff541c.png)
claunia added the Needs-TriageIssue-BugNeeds-Tag-FixNeeds-Attention labels 2026-01-31 05:38:22 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Apr 21, 2022):

Does the cd work in an unelevated (not admin) window?

Can you cd into that directory in other shells (cmd, powershell, etc)/?

@zadjii-msft commented on GitHub (Apr 21, 2022): Does the `cd` work in an unelevated (not admin) window? Can you `cd` into that directory in other shells (`cmd`, `powershell`, etc)/?
Author
Owner

@NotGeekAtAll commented on GitHub (Apr 22, 2022):

thanks for reply @zadjii-msft

  1. I can't cd whether is admit or not
  2. I can cd into the directory by powershell
@NotGeekAtAll commented on GitHub (Apr 22, 2022): thanks for reply @zadjii-msft 1. I can't `cd` whether is admit or not 2. I can `cd` into the directory by powershell
Author
Owner

@zadjii-msft commented on GitHub (Apr 26, 2022):

2. I can cd into the directory by powershell

Well that's bizarre. That sure doesn't make sense. I wonder if there's some difference between just running git bash directly, and the commandline you have set for that profile. Does the same thing occur if you run c:\Program Files\Git\bin\bash.exe -l -i from the Run Dialog (win+r)/?

@zadjii-msft commented on GitHub (Apr 26, 2022): > 2\. I can `cd` into the directory by powershell Well that's bizarre. That sure doesn't make sense. I wonder if there's some difference between just running git bash directly, and the `commandline` you have set for that profile. Does the same thing occur if you run `c:\Program Files\Git\bin\bash.exe -l -i` from the Run Dialog (<kbd>win+r</kbd>)/?
Author
Owner

@NotGeekAtAll commented on GitHub (Apr 27, 2022):

@zadjii-msft I've tried running c:\Program Files\Git\bin\bash.exe -l -i from the Run Dialog (win+r).It turns out that I can open it successfully. But still, I can't cd into bizplat-ui directory, and terminal has no responding.
image

@NotGeekAtAll commented on GitHub (Apr 27, 2022): @zadjii-msft I've tried running `c:\Program Files\Git\bin\bash.exe -l -i` from the Run Dialog (win+r).It turns out that I can open it successfully. But still, I can't `cd` into `bizplat-ui` directory, and terminal has no responding. ![image](https://user-images.githubusercontent.com/16792509/165418053-f4316e4f-017c-47c3-8563-e2527d3a86f8.png)
Author
Owner

@DHowett commented on GitHub (Apr 27, 2022):

This is probably due to Git Prompt Integration. It is trying to read the git repository, and it cannot do that. So the prompt hangs.

This issue is outside of Terminal or Console's control. You may need to debug this with the Git For Windows project.

@DHowett commented on GitHub (Apr 27, 2022): This is probably due to Git Prompt Integration. It is trying to read the git repository, and it cannot do that. So the prompt hangs. This issue is outside of Terminal or Console's control. You may need to debug this with the Git For Windows project.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17303