Priority level of a config file.
These priority levels correspond to the natural escalation logic (from higher to lower) when reading or searching for config entries in git.git. Meaning that for the same key, the configuration in the local configuration is preferred over the configuration in the system configuration file.
Callers can add their own custom configuration, beginning at the
GIT_CONFIG_LEVEL_APP
level.
Writes, by default, occur in the highest priority level backend
that is writable. This ordering can be overridden with
git_config_set_writeorder
.
git_config_open_default() and git_repository_config() honor those priority levels as well.
System-wide on Windows, for compatibility with portable git
System-wide configuration file; /etc/gitconfig on Linux systems
XDG compatible configuration file; typically ~/.config/git/config
User-specific configuration file (also called Global configuration file); typically ~/.gitconfig
Repository specific configuration file; $WORK_DIR/.git/config on non-bare repos
Worktree specific configuration file; $GIT_DIR/config.worktree
Application specific configuration file; freely defined by applications
Represents the highest level available config file (i.e. the most specific config file available that actually is loaded)