在Windows上安装git时存储的git设置在哪里?
答
有店:
- 在git的安装文件夹本身(
<git>\etc\gitconfig
):系统配置 - 在
%HOME%\.gitconfig
(全局配置),和id您正在使用git-cmd.bat
,HOME
设置为%USER_PROFILE%
- (.git/config)
请注意,您需要定义core.autoc你自己,因为<git>\etc\gitconfig
定义它默认为true。
git config --global core.autocrlf false
(同时有cases where core.autocrlf
can help,我更喜欢将它设置为false,并working with .gitattributes core.eol
directives)
答
尝试使用运行在“混帐打击” echo $HOME
,它应该给你的home目录(这可能是你正在寻找)。