Find configuration file locations
Find common configuration file locations, precedence rules, and commands for developer tools.
Git config file locations
Commands use a POSIX shell (macOS, Linux, or WSL). Install the named editor or CLI first. Before using an environment-variable path, check that the variable is set to a non-empty, intended path. When using vi or Notepad, ensure the parent directory exists and is writable. A missing file is created when you save it; Notepad may ask to create it.
Higher-priority files override the same setting in lower-priority files.
Local level
Highest priorityApplies only to one Git repository. Run commands from inside that repository.
Config file location
<repository>/.git/configCommands
git config --local --editGlobal level
Second priorityApplies to your user account.
Config file location
~/.gitconfigGit also reads this user-specific file when present.$XDG_CONFIG_HOME/git/configCommands
git config --global --editSystem level
Third priorityApplies to every user on this Git installation.
Config file location
$(prefix)/etc/gitconfigCommands
git config --system --edit
Inspect configuration
git config --list --show-origin --show-scopeOfficial Git documentation