git: Where does my configuration information come from?

advertisements

I have two conflicting config definitions in my git setup.

$ git config  --list|grep diff.tool
diff.tool=p4merge
diff.tool=extDiff

How can I tell where each of these definitions are being set on my MacOS system?

related windows question here: Where is this value in my configuration coming from?


This snippet will show the three potential places where the configuration can be set.

$ for i in local global system; do echo $i:;git config  --$i --list|grep diff.tool;done
local:
global:
diff.tool=p4merge
diff.tool=extDiff
system:
fatal: unable to read config file '/usr/local/etc/gitconfig': No such file or directory