From: Junio C Hamano Date: Wed, 31 Jul 2013 19:38:15 +0000 (-0700) Subject: Merge branch 'rr/maint-tilde-markup-in-doc' X-Git-Tag: v1.8.4-rc1~12 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5ecc4b53f77d939dfad2819658cc51f4053a03f3?ds=inline;hp=-c Merge branch 'rr/maint-tilde-markup-in-doc' * rr/maint-tilde-markup-in-doc: config doc: quote paths, fixing tilde-interpretation --- 5ecc4b53f77d939dfad2819658cc51f4053a03f3 diff --combined Documentation/git-config.txt index 34b0894646,cc455ec785..2dbe486eb1 --- a/Documentation/git-config.txt +++ b/Documentation/git-config.txt @@@ -96,29 -96,31 +96,31 @@@ OPTION names are not. --global:: - For writing options: write to global ~/.gitconfig file rather than - the repository .git/config, write to $XDG_CONFIG_HOME/git/config file - if this file exists and the ~/.gitconfig file doesn't. + For writing options: write to global `~/.gitconfig` file + rather than 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 and from - $XDG_CONFIG_HOME/git/config 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 <>. --system:: - For writing options: write to system-wide $(prefix)/etc/gitconfig - rather than the repository .git/config. + For writing options: write to system-wide + `$(prefix)/etc/gitconfig` rather than the repository + `.git/config`. + - For reading options: read only from system-wide $(prefix)/etc/gitconfig + For reading options: read only from system-wide `$(prefix)/etc/gitconfig` rather than from all available files. + See also <>. --local:: - For writing options: write to the repository .git/config file. + For writing options: write to the repository `.git/config` file. This is the default behavior. + - For reading options: read only from the repository .git/config rather than + For reading options: read only from the repository `.git/config` rather than from all available files. + See also <>. @@@ -127,13 -129,6 +129,13 @@@ --file config-file:: Use the given config file instead of the one specified by GIT_CONFIG. +--blob blob:: + Similar to '--file' but use the given blob instead of a file. E.g. + you can use 'master:.gitmodules' to read values from the file + '.gitmodules' in the master branch. See "SPECIFYING REVISIONS" + section in linkgit:gitrevisions[7] for a more complete list of + ways to spell blob names. + --remove-section:: Remove the given section from the configuration file. @@@ -213,23 -208,23 +215,23 @@@ FILE If not set explicitly with '--file', there are four files where 'git config' will search for configuration options: -$GIT_DIR/config:: - Repository specific configuration file. - -~/.gitconfig:: - User-specific configuration file. Also called "global" - configuration file. +$(prefix)/etc/gitconfig:: + System-wide 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 + 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 + `~/.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. +~/.gitconfig:: + User-specific configuration file. Also called "global" + configuration file. + +$GIT_DIR/config:: + Repository specific configuration file. If no further options are given, all reading options will read all of these files that are available. If the global or the system-wide configuration @@@ -237,10 -232,6 +239,10 @@@ file are not available they will be ign file is not available or readable, 'git config' will exit with a non-zero error code. However, in neither case will an error message be issued. +The files are read in the order given above, with last value found taking +precedence over values read earlier. When multiple values are taken then all +values of a key from all files will be used. + All writing options will per default write to the repository specific configuration file. Note that this also affects options like '--replace-all' and '--unset'. *'git config' will only ever change one file at a time*.