Solution 1 :

git config --list shows you all the variables, --show-origin also adds the source of the value.

For example, --list can show

core.excludesfile=/home/choroba/.gitignore_global

While --show-origin would also include

file:/home/choroba/.gitconfig    core.excludesfile=/home/choroba/.gitignore_global

I.e. the excludesfile is set to the ~/gitignore_global, and the actual setting happens in ~/.gitconfig.

Solution 2 :

It perhaps can be confusing that

git config --show-origin

doesn’t work, instead --show-origin must be used as a modifier together with the --list option like that:

git config --list --show-origin

which then additionally lists the respective sources of the git configuration entries as expected.

Problem :

What is the difference between git config --list and git config --list --show-origin
Please tell.

Comments

Comment posted by doc

What’s unclear in the

Comment posted by LeGEC

for reference : any git command has an extended documentation, which you can access running

Comment posted by Andi Hafner

Perhaps the question should read “Why does

By