I can't find any documentation describing exactly what Git configuration files are being checked when a git config --get-all command is run. Here's my output when I run it for core.autocrlf:
git config --get-all core.autocrlf
Output:
false
true
true
I'm having some phantom line feed issues. Where is that first "false" is coming from? I've read that Git is supposed to use the last one, and "true" is the setting I want. But I'm not sure if it's always using that in every scenario. Like if I'm using alternative Git UI's through Eclipse Git or through the Git GUI applications or something.
I think two places that it's being read from is:
REPO_DIR/.git/config
and
WINDOWS_USER_DIR/.gitconfig
But where's this third configuration setting coming from?
Git will check these files in the given order:
$(prefix)/etc/gitconfig$XDG_CONFIG_HOME/git/config or $HOME/.config/git/config~/.gitconfig$GIT_DIR/configSo the third value likely comes from the system-wide configuration file in /etc/gitconfig.
See the git-config man page for further details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With