Changing .gitconfig location on Windows

后端 未结 13 2469
伪装坚强ぢ
伪装坚强ぢ 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 12:18

    1. Change to folder %PROGRAMFILES%\Git\etc
    2. Edit file profile
    3. Add to first line HOME="c:\location_were_you_want_gitconfig"
    4. Done

    Note: The file permissions are usually restricted, so change them accordingly or you won't be able to save your changes.

提交回复
热议问题