Changing .gitconfig location on Windows

后端 未结 13 2517
伪装坚强ぢ
伪装坚强ぢ 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:08

    Change HOME directory for this is wrong. Better is create symbolic link for gitconfig to HOME directory.

    1. Move your .gitconfig from user home directory, to the directory where you want.
    2. Run command line as Administrator
    3. Go to your user home directory
    4. Enter mklink .gitconfig \PathForNewLocationOfConfig.gitconfig

提交回复
热议问题