git has 3 levels of configuration files
- local: local files are stored in the repository (.git/config) and are only for the current repository
- global: the global file is stored in ~/.gitconfig or ~/.config/git/config, which works for all repositories of the current user
- system: the system file is stored as /etc/gitconfig, which works for each user on the system
- The global configuration file for the windows environment is stored as C:\User\$USER\.gitconfig
The priority is local > global > system