Where is this value in my configuration coming from?

浪尽此生 提交于 2019-12-24 01:57:16

问题


When I use git config --list to check the value of core.autocrlf in --system, --global, and --local this is what I get:

$ git config --system --list | grep autocrlf
core.autocrlf=true
$ git config --global --list | grep autocrlf
core.autocrlf=true
$ git config --local --list | grep autocrlf

Which is fine.

But when I do it for everything (without the --system, --global, or --local), I get something odd:

$ git config --list | grep autocrlf
core.autocrlf=false
core.autocrlf=true
core.autocrlf=true

Where does that first false value come from, if it's not in my --system, --global, or --local?

I am using the version of git that comes with SourceTree for Windows.


回答1:


As you found out the configuration can be found under 3 location on your machine.

Sourcetree also has its own git version which you can use. if you use it and not the system git you will have another .gitconfig file.

This is where your values are coming from.

In windows you will find inside:

C:\Program Files (x86)\Atlassian\SourceTree\SourceTree.exe.config

Its not the usual git config, its an XML file which sourceTree reads the values from.

For example here is an entry from this file:

<setting name="DiffWhiteSpaceIgnored" serializeAs="String">
    <value>False</value>
</setting>

You can set it here:



来源:https://stackoverflow.com/questions/34136453/where-is-this-value-in-my-configuration-coming-from

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!