[英]Where is this value in my configuration coming from?
當我使用git config --list
檢查--system
,-- --global
和--local
中core.autocrlf
的值時,這是我得到的:
$ git config --system --list | grep autocrlf
core.autocrlf=true
$ git config --global --list | grep autocrlf
core.autocrlf=true
$ git config --local --list | grep autocrlf
沒關系
但是,當我對所有內容(沒有--system
,-- --global
或--local
)執行此操作時,我會感到奇怪:
$ git config --list | grep autocrlf
core.autocrlf=false
core.autocrlf=true
core.autocrlf=true
如果第一個false
值不在我的--system
,-- --global
或--local
, --global
--local
?
我正在使用Windows的SourceTree隨附的git版本。
如您所知,配置可以在計算機上的3個位置下找到。
Sourcetree也有自己的git版本,可以使用。 如果使用它而不是系統git,則會有另一個.gitconfig文件。
這就是您的價值觀的來源。
在Windows中,您可以找到以下內容:
C:\Program Files (x86)\Atlassian\SourceTree\SourceTree.exe.config
它不是通常的git config,而是一個XML文件,sourceTree從中讀取值。
例如,這是此文件中的一項:
<setting name="DiffWhiteSpaceIgnored" serializeAs="String">
<value>False</value>
</setting>
您可以在這里設置:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.