how to change gitconfig location?

git, windows

Solution

Can I still fix this by changing the config location or creating a new config?

You can simply change your environment variable `HOME`, in order to reference an existing local folder

set HOME=C:\local\path

In that folder, a .gitconfig can be defined in order to have a global git config file.

The `msysgit/msysgit/git-cmd.bat` defines it by default to:

@if not exist "%HOME%" @set HOME=%USERPROFILE%

Problem

I am running this command under windows 7: ``` git status ``` Now I am getting this error: ``` fatal: unable to access 'H:\/.config/git/config ``` I am disconnected from the network at the moment. Can I still fix this by changing the config location or creating a new config?

Original source