Git doesn't change working directory

I’m using Windows 10. Before I install git, I have installed git 1.9.5.github.0 (by installing GitHub Desktop), it works just fine.
But when I installed git (from, I’m not able to use git anymore:

After that, I returned to the old version of git – git 1.9.5.github.0, but the fault still there.

I think git didn’t change its working directory, I have no idea.
Now, I’m not able to work with git.

How to fix this?


Again, this is not the first time I use git, I never forget cd myproject. However, although I moved to the project, git “thought” itself working in C:\Program Files\Git and doesn’t “realize” that the working directory has been changed! That’s the problem, As the title: Git doesn’t change working directory


When Get-Command git in powershell, it returns:

CommandType      Name         Version      Source
-----------      ----         -------      ------
Application      git.exe      C:\Program Files\Git\cmd\git.exe


@EdwardThomson asked me for output of git config --list and Get-ChildItem Env:

  • Output of git config --list:

  • Output of Get-ChildItem Env:


I have received an email which mentions GIT_DIR, then I know what exactly caused my problem! It’s because of environment variable GIT_DIR, I set GIT_DIR to the folder which contains git for convenience without aware that git uses it

Thank you for trying to help me.

  • Creating an official github mirror
  • Check if git branch exists in bash: weird interpolation behavior
  • Checkout a tag from a private GitHub repository
  • How can I diff two branches with fugitive?
  • git log --follow, show all commits including merges
  • Correct way to set up Github repo in Pydev?
  • One Solution collect form web for “Git doesn't change working directory”

    you must be inside a folder having .git directory (hidden).

    Git Baby is a git and github fan, let's start git clone.