Configuration files in GIT

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.


git config

It is tool used by GIT to set and get configuration variables, these configuration controls all aspects of how GIT looks and operates

GIT Local
These configurations are stored in the .git folder in the same location where the repository is created

.git\config

GIT Global
These configuration resides in the home directory(C:\Users\<UserName>\) i.e %USERPROFILE% and the configuration is stored in the file .gitconfig

%USERPROFILE%\.gitconfig

GIT System
These configuration resides at location C:\ProgramData\Git\config

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

Leave a Reply

Your email address will not be published. Required fields are marked *