how to change gitconfig location?

后端 未结 3 1845
借酒劲吻你
借酒劲吻你 2020-12-19 05:11

I am running this command under windows 7:

git status

Now I am getting this error:

fatal: unable to access \'H:\\/.config/g         


        
3条回答
  •  孤城傲影
    2020-12-19 05:40

    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%
    

提交回复
热议问题