tags:

views:

34

answers:

1

Somehow, my global git (msysgit) settings for user.name and user.email (and god knows what else) are set to a recent ex-colleague's details.

When I try and change them i get could not commit to u://.gitconfig

If I try and create u://.gitconfig through git bash then i get permission denied.

C:\Users\<My Username>\

contains no references to git.

I've tried uninstalling, searching the registry and my file system for all references to git and I can't find any (windows file search is crap though).

What the hell is going on? Why even after reinstalling are this guys details still the global settings???

Thanks

+2  A: 

The global gitconfig is store at the $HOME location (in the Git bash session).
Is it possible you have a $HOME (or %HOME% in DOS session) referencing u:\.

If so, simply set HOME=%HOMEPATH% (if you have HOMEPATH defined like in Windows 7), and you should be able to resume accessing/updating your global Git configuration.


The OP adds:

my %HOMEPATH% is set to \, will setting HOME to that help?

Well actually no, since HOME is not a environment variable usually set by Windows (Xp, Vista or 7).

fixed it, awesome, set HOME to c:\users\me

That is the right fix, although fixing HOMEPATH (even if that doesn't directly involve Git) would be also advisable (it shouldn't refer to u:\).

VonC
aha! i was assuming u:\ was some git\linux thing but its clearly our network's user profile drive. doh! (i never use that) There must be some network setup error where its not syncing peoples .gitconfig files properly, so said ex-colleague's (probably the only git user) config is ending up in my share. my `%HOMEPATH%` is set to `\\`, will setting `HOME` to that help?
Andrew Bullock
fixed it, awesome, set `HOME` to c:\users\me
Andrew Bullock
@Andrew: sorry, just get back from lunch. You have the right fix, even though `HOMEPATH` should also be set at a correct value. I have updated my answer to reflect your comments and solution.
VonC