Changing .gitconfig location on Windows

后端 未结 13 2483
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 11:49

By default on Windows Git places global .gitconfig in c:\\documents and settings\\user\\

How can I change that position so .gitconfig is stored in

13条回答
  •  庸人自扰
    2020-11-27 11:56

    First check HOME setting, then change HOME and HOMEDRIVE to a existing dir.

    c:\git>set HOME
    HOME=U:\
    HOMEDRIVE=U:
    HOMEPATH=\
    

    then change HOME and HOMEDRIVE by

    set HOME=c:\tmp
    set HOMEDRIVE=C:
    

提交回复
热议问题