在 windows 上安装 git 时,git 设置存储在哪里?
Where are the git settings stored when installing git on windows?
这些设置存储在 windows 8 中的什么地方?
不在
C:\Users\[用户]\.gitconfig
显然。
有店铺:
- 在 git 安装文件夹本身 (
<git>\etc\gitconfig
) 中:系统配置
- 在
%HOME%\.gitconfig
(全局配置)中,您使用的id git-cmd.bat
,HOME
设置为%USER_PROFILE%
- 在您的本地存储库 (.git/config)
注意需要自己定义core.autocrlf因为<git>\etc\gitconfig
默认定义为true
git config --global core.autocrlf false
(同时还有 cases where core.autocrlf
can help, I prefer setting it to false and working with .gitattributes core.eol
directives)
尝试在 "git bash" 中使用 运行 echo $HOME
,它应该会为您提供它的主目录(这可能是您要找的)。
这些设置存储在 windows 8 中的什么地方?
不在 C:\Users\[用户]\.gitconfig
显然。
有店铺:
- 在 git 安装文件夹本身 (
<git>\etc\gitconfig
) 中:系统配置 - 在
%HOME%\.gitconfig
(全局配置)中,您使用的idgit-cmd.bat
,HOME
设置为%USER_PROFILE%
- 在您的本地存储库 (.git/config)
注意需要自己定义core.autocrlf因为<git>\etc\gitconfig
默认定义为true
git config --global core.autocrlf false
(同时还有 cases where core.autocrlf
can help, I prefer setting it to false and working with .gitattributes core.eol
directives)
尝试在 "git bash" 中使用 运行 echo $HOME
,它应该会为您提供它的主目录(这可能是您要找的)。