简体   繁体   中英

Where is this value in my configuration coming from?

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.

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:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM