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:

  • Using git for VS2010 project: Can't add file *.opensdf
  • SubGit calling GitLabs post-receive hook doesn't work
  • Make Xcode 4 stop auto staging with git
  • Git remote repo, not showing the files
  • Git overwrites files during a merge - does not show conflicts
  • Error clone project gitlab with https
  • 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. Merging changes from one file to another files WITHIN the same branch
  • Why is there a `remotes/origin/HEAD -> origin/master` entry in my `git branch -l -a` output?
  • Sync 2 Folders in different GIT-Repos
  • Custom Git merge driver with no rename detection
  • In Libgit2sharp, is there any way to revert some files' change (Not commited)?
  • Branching/Forking just portion of parent repository
  • 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.