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

I installed git on my Windows computer, when I run git config --global using powershell or cmd.exe, it writes C:\c\Users\xxx\.gitconfig to this file.

While I run the git config command in git - bash, it works with this file: C:\Users\xxx\.gitconfig

Where is the c\ folder located? I do not understand.

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

+8
git windows
source share
1 answer

I found the cause of the problem: I installed Cygwin earlier, and it set the HOME environment variable on my PC to c\Users\xxx . This is why PowerShell and cmd.exe found the file in this folder.

0
source share

All Articles