X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=Documentation%2Fgit-config.txt;h=eaea0791657386469e448def614b949c0a1f45e9;hb=1c88a6d17492b197b9b3298cbc34efa804928302;hp=21b8f6110bfc2a9c7891c166e3ee78a8246dcb1e;hpb=e09e4024a070e666ed40b66442e8151b91d623e4;p=git.git diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt index 21b8f6110..eaea07916 100644 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@ -97,10 +97,11 @@ OPTIONS --global:: For writing options: write to global ~/.gitconfig file rather than - the repository .git/config. + the repository .git/config, write to $XDG_CONFIG_HOME/git/config file + if this file exists and the ~/.gitconfig file doesn't. + -For reading options: read only from global ~/.gitconfig rather than -from all available files. +For reading options: read only from global ~/.gitconfig and from +$XDG_CONFIG_HOME/git/config rather than from all available files. + See also <>. @@ -194,7 +195,7 @@ See also <>. FILES ----- -If not set explicitly with '--file', there are three files where +If not set explicitly with '--file', there are four files where 'git config' will search for configuration options: $GIT_DIR/config:: @@ -204,6 +205,14 @@ $GIT_DIR/config:: User-specific configuration file. Also called "global" configuration file. +$XDG_CONFIG_HOME/git/config:: + Second user-specific configuration file. If $XDG_CONFIG_HOME is not set + or empty, $HOME/.config/git/config will be used. Any single-valued + variable set in this file will be overwritten by whatever is in + ~/.gitconfig. It is a good idea not to create this file if + you sometimes use older versions of Git, as support for this + file was added fairly recently. + $(prefix)/etc/gitconfig:: System-wide configuration file.