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.
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.
What is the difference between git config --list
and git config --list --show-origin
Please tell.
for reference : any git command has an extended documentation, which you can access running