5

I recently installed Git for Windows (https://git-scm.com/download/win) on my machine and was having issues finding my global .gitconfig file (see stackoverflow.com/questions/39670247/cant-find-global-gitconfig-file/39671485).

Turns out it was on a share/network drive. Why would Git put the global .gitconfig file there?

sdoca
  • 7,832
  • 23
  • 70
  • 127

2 Answers2

4

This should be defined by environment HOME, which, as far as I understand, may be defined by windows domain settings to point to some "your" place in network. It is possible to redefine it in "environment for this user" settings dialog

max630
  • 8,762
  • 3
  • 30
  • 55
  • 2
    Hi, I found this link which talks about the HOME variable http://stackoverflow.com/questions/32232978/change-the-location-of-directory-in-a-windows-install-of-git-bash. In my case, I didn't have a HOME environment variable set so it defaulted to my network drive. After setting HOME to my local drive (and moving the files from the network drive) all is well. – sdoca Sep 28 '16 at 14:22
0

Mine was doing the same thing. I couldn't find any setting in git that would point it to a network drive - very strange.

The network drive git was looking on (in my case a P: drive) wasn't always available, so as suggested, I create a HOME environment variable and pointed it to C:\config. I then placed my .gitconfig file in there. It seems to work fine now.

I still have no explanation why it was looking at P: in the first place, perhaps there is another environment variable it was looking at, but I couldn't see anything obvious.

VincentH
  • 103
  • 2
  • 2
  • 7