Why powershell and cmd.exe use the git config file is in C:\c\Users\xxx\.gitconfig?

I have installed git on my windows pc, when I run git config --global using powershell or cmd.exe, it’s writing to this file C:\c\Users\xxx\.gitconfig.

While when I run the git config command in git-bash, it’s operating this file:
C:\Users\xxx\.gitconfig

  • git ssl without env GIT_SSL_NO_VERIFY=true
  • How to turn off Git warnings “LF will be replaced by CRLF”?
  • I got an error while using “heroku open” command
  • jitpack.io failed to resolve github repo
  • Git bisect with merged commits
  • What are the differences between .gitignore and .gitkeep?
  • Where the c\ folder coming from?? I don’t get it.

    How can I tell powershell and cmd.exe use the same file as git-bash??

  • Git filter-branch: possible to update commit messages to reference old commit IDs?
  • Updates were rejected because the tip of your current branch is behind
  • Download git submodules for tarball
  • Why is Jenkins getting Authentication Failed error for git submodule update?
  • Version control of Mathematica notebooks
  • Git will escape the backslash on my remote path for Network
  • One Solution collect form web for “Why powershell and cmd.exe use the git config file is in C:\c\Users\xxx\.gitconfig?”

    I find the cause of the issue: I installed cygwin before, and it sets the HOME environment variable on my pc to c\Users\xxxx, that’s why powershell and cmd.exe is locating the file in that folder.

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