1

I run Git on Windows via Git Bash. I went to do a commit and it told me that my .gitconfig had changed.

I'm wondering why suddenly it is using my local NT account when in the past it was using my gmail and associated github user name.

Was my .gitconfig somehow corrupted? It doesn't look like it because I see my NT user name and email addres in there now.

raddevus
  • 8,142
  • 7
  • 66
  • 87

1 Answers1

0

I had started Git Bash as Administrator.
When I did that, it generated a new .gitconfig under my c:\users\<username>\ directory.

I went back and started Git Bash normally and I see that my .gitconfig is back to normal now, using my gmail and github account. Obviously some of the ENV settings get overwritten or something when you run Git Bash As Administrator.

Additionally, I found that when Git Bash runs under my account then my .gitconfig is read from a \network location that is associated with my user name by the network team.

However, when I ran as Administrator it read the .gitconfig from the \local machine\users\<username>\ directory.

I copied the .gitconfig from the network drive over the top of the one in my local user directory and that solves the problem so both are the same when I run Git Bash As Admin.

raddevus
  • 8,142
  • 7
  • 66
  • 87