2017-10-18 95 views
0

(在Windows git version 2.14.1.windows.1)以下所有不打印 什么:如果未在本地/全局/系统级别设置core.autocrlf,它仍能如何设置?

git config --global core.autocrlf 
git config --system core.autocrlf 
git config --local core.autocrlf 

但下面的打印true

git config core.autocrlf 

这怎么可能呢?这个值在哪里存储?

+0

检查'$ HOME/.config/git/config'。请参阅https://www.git-scm.com/docs/git-config#FILES。 – ElpieKay

+0

@ElpieKay我没有这样的文件,但我有'%HOME%/。gitconfig'包含它。 –

+0

如果是这样,它应该已经由'global'打印。我不知道为什么。 – ElpieKay

回答

2

如果你的Git版本至少2.8.0,运行:

git config --show-origin core.autocrlf 

例如,对于我的配置,其中core.autocrlf没有设置,所以我必须用另一个名字 - 我得到:

$ git config --show-origin alias.outgoing 
file:<path>/.gitconfig log --oneline @{u}.. 

git outgoing是一个快速的方式来看看我有什么提交git push可能推动)。