【发布时间】:2016-07-12 19:52:51
【问题描述】:
我使用的是 git 版本 2.8.3.windows.1,对 core.autocrlf 设置的实际存储位置有点困惑。在 Git Extensions 中它显示为“未设置”,但是当我查询 git config 时得到以下信息:
$ cd /c <-- i.e. not a repo
$ git config --get core.autocrlf
false
$ git config --global --get core.autocrlf
(nothing)
$ git config --system --get core.autocrlf
(nothing)
$ git config -l
core.symlinks=false
core.autocrlf=false
core.fscache=true
...
$ git config --system -l
credential.helper=manager
$ git config --global -l
core.editor="C:/Program Files (x86)/GitExtensions/GitExtensions.exe" fileeditor
core.quotepath=false
color.ui=auto
... (not here either)
$ git config --local -l
fatal: unable to read config file '.git/config': No such file or directory
.gitconfig 文件也没有
$ cat ~/.gitconfig
[core]
editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor
quotepath = false
所以我知道 GitExt 如何将其显示为“未设置”,但我完全不明白 git config -l 如何获得 core.autocrlf 的值。而且我似乎无法摆脱它来重新编写它:
$ git config --unset core.autocrlf
fatal: not in a git directory
$ git config --unset --global core.autocrlf
$ git config -l
core.symlinks=false
core.autocrlf=false
core.fscache=true
...
谢谢。
【问题讨论】:
-
试试
git config --show-origin -l
标签: git