GIT configuration can be stored at three locations local, global and system. GIT config tool handles all these configuration by setting and getting its values.
It is tool used by GIT to set and get configuration variables, these configuration controls all aspects of how GIT looks and operates
These configurations are stored in the .git folder in the same location where the repository is created
These configuration resides in the home directory(C:\Users\<UserName>\) i.e %USERPROFILE% and the configuration is stored in the file .gitconfig
These configuration resides at location C:\ProgramData\Git\config
You can view all your settings and see where they are coming from using the below command
git config --list --show-origin