git config --list
shows two values for user.name
, one global, one local:
user.name=My Name
...
user.name=My Other Name
...
My understanding is that local values override global ones. How can I get git config
to only show the values that are actually in effect? I only want to see one value of user.name -- the one that will be used if I commit in the current context.
If my question is based on a misunderstanding, or if this is caused by something wrong with my git install, that would also be very helpful.
On Git version 2.8.0 and above, you can type
git config --list --show-origin
to show the origin of the individual configuration entry.
Order of preference is local
> global
> system
. So local configuration will be preferred over global if present.
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