summaryrefslogtreecommitdiff
path: root/Documentation/config.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r--Documentation/config.txt343
1 files changed, 214 insertions, 129 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c5e1835..c081657 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -12,8 +12,9 @@ The configuration variables are used by both the git plumbing
and the porcelains. The variables are divided into sections, wherein
the fully qualified variable name of the variable itself is the last
dot-separated segment and the section name is everything before the last
-dot. The variable names are case-insensitive and only alphanumeric
-characters are allowed. Some variables may appear multiple times.
+dot. The variable names are case-insensitive, allow only alphanumeric
+characters and `-`, and must start with an alphabetic character. Some
+variables may appear multiple times.
Syntax
~~~~~~
@@ -45,24 +46,26 @@ lines. Variables may belong directly to a section or to a given subsection.
You can have `[section]` if you have `[section "subsection"]`, but you
don't need to.
-There is also a case insensitive alternative `[section.subsection]` syntax.
-In this syntax, subsection names follow the same restrictions as for section
-names.
+There is also a deprecated `[section.subsection]` syntax. With this
+syntax, the subsection name is converted to lower-case and is also
+compared case sensitively. These subsection names follow the same
+restrictions as section names.
All the other lines (and the remainder of the line after the section
header) are recognized as setting variables, in the form
'name = value'. If there is no equal sign on the line, the entire line
is taken as 'name' and the variable is recognized as boolean "true".
-The variable names are case-insensitive and only alphanumeric
-characters and `-` are allowed. There can be more than one value
-for a given variable; we say then that variable is multivalued.
+The variable names are case-insensitive, allow only alphanumeric characters
+and `-`, and must start with an alphabetic character. There can be more
+than one value for a given variable; we say then that the variable is
+multivalued.
Leading and trailing whitespace in a variable value is discarded.
Internal whitespace within a variable value is retained verbatim.
The values following the equals sign in variable assign are all either
a string, an integer, or a boolean. Boolean values may be given as yes/no,
-0/1, true/false or on/off. Case is not significant in boolean values, when
+1/0, true/false or on/off. Case is not significant in boolean values, when
converting value to the canonical form using '--bool' type specifier;
'git config' will ensure that the output is "true" or "false".
@@ -83,6 +86,17 @@ customary UNIX fashion.
Some variables may require a special value format.
+Includes
+~~~~~~~~
+
+You can include one config file from another by setting the special
+`include.path` variable to the name of the file to be included. The
+included file is expanded immediately, as if its contents had been
+found at the location of the include directive. If the value of the
+`include.path` variable is a relative path, the path is considered to be
+relative to the configuration file in which the include directive was
+found. See below for examples.
+
Example
~~~~~~~
@@ -105,6 +119,10 @@ Example
gitProxy="ssh" for "kernel.org"
gitProxy=default-proxy ; for the rest
+ [include]
+ path = /path/to/foo.inc ; include by absolute path
+ path = foo ; expand "foo" relative to the current file
+
Variables
~~~~~~~~~
@@ -114,40 +132,37 @@ in the appropriate manual page. You will find a description of non-core
porcelain configuration variables in the respective porcelain documentation.
advice.*::
- When set to 'true', display the given optional help message.
- When set to 'false', do not display. The configuration variables
- are:
+ These variables control various optional help messages designed to
+ aid new users. All 'advice.*' variables default to 'true', and you
+ can tell Git that you do not need help by setting these to 'false':
+
--
pushNonFastForward::
Advice shown when linkgit:git-push[1] refuses
- non-fast-forward refs. Default: true.
+ non-fast-forward refs.
statusHints::
Directions on how to stage/unstage/add shown in the
output of linkgit:git-status[1] and the template shown
- when writing commit messages. Default: true.
+ when writing commit messages.
commitBeforeMerge::
Advice shown when linkgit:git-merge[1] refuses to
merge to avoid overwriting local changes.
- Default: true.
resolveConflict::
Advices shown by various commands when conflicts
prevent the operation from being performed.
- Default: true.
implicitIdentity::
Advice on how to set your identity configuration when
your information is guessed from the system username and
- domain name. Default: true.
-
+ domain name.
detachedHead::
- Advice shown when you used linkgit::git-checkout[1] to
+ Advice shown when you used linkgit:git-checkout[1] to
move to the detach HEAD state, to instruct how to create
- a local branch after the fact. Default: true.
+ a local branch after the fact.
--
core.fileMode::
If false, the executable bit differences between the index and
- the working copy are ignored; useful on broken filesystems like FAT.
+ the working tree are ignored; useful on broken filesystems like FAT.
See linkgit:git-update-index[1].
+
The default is true, except linkgit:git-clone[1] or linkgit:git-init[1]
@@ -179,7 +194,7 @@ is created.
core.trustctime::
If false, the ctime differences between the index and the
- working copy are ignored; useful when the inode change time
+ working tree are ignored; useful when the inode change time
is regularly modified by something outside Git (file system
crawlers and some backup systems).
See linkgit:git-update-index[1]. True by default.
@@ -292,7 +307,7 @@ core.ignoreStat::
If true, commands which modify both the working tree and the index
will mark the updated paths with the "assume unchanged" bit in the
index. These marked files are then assumed to stay unchanged in the
- working copy, until you mark them otherwise manually - Git will not
+ working tree, until you mark them otherwise manually - Git will not
detect the file changes by lstat() calls. This is useful on systems
where those are very slow, such as Microsoft Windows.
See linkgit:git-update-index[1].
@@ -320,7 +335,7 @@ core.worktree::
Set the path to the root of the working tree.
This can be overridden by the GIT_WORK_TREE environment
variable and the '--work-tree' command line option.
- The value can an absolute path or relative to the path to
+ The value can be an absolute path or relative to the path to
the .git directory, which is either specified by --git-dir
or GIT_DIR, or automatically discovered.
If --git-dir or GIT_DIR is specified but none of
@@ -344,7 +359,9 @@ core.logAllRefUpdates::
SHA1, the date/time and the reason of the update, but
only when the file exists. If this configuration
variable is set to true, missing "$GIT_DIR/logs/<ref>"
- file is automatically created for branch heads.
+ file is automatically created for branch heads (i.e. under
+ refs/heads/), remote refs (i.e. under refs/remotes/),
+ note refs (i.e. under refs/notes/), and the symbolic ref HEAD.
+
This information can be used to determine what commit
was the tip of a branch "2 days ago".
@@ -376,15 +393,6 @@ core.warnAmbiguousRefs::
If true, git will warn you if the ref name you passed it is ambiguous
and might match multiple refs in the .git/refs/ tree. True by default.
-core.abbrevguard::
- Even though git makes sure that it uses enough hexdigits to show
- an abbreviated object name unambiguously, as more objects are
- added to the repository over time, a short name that used to be
- unique will stop being unique. Git uses this many extra hexdigits
- that are more than necessary to make the object name currently
- unique, in the hope that its output will stay unique a bit longer.
- Defaults to 0.
-
core.compression::
An integer -1..9, indicating a default compression level.
-1 is the zlib default. 0 means no compression,
@@ -451,8 +459,6 @@ for most projects as source code and other text files can still
be delta compressed, but larger binary media files won't be.
+
Common unit suffixes of 'k', 'm', or 'g' are supported.
-+
-Currently only linkgit:git-fast-import[1] honors this setting.
core.excludesfile::
In addition to '.gitignore' (per-directory) and
@@ -482,6 +488,12 @@ core.editor::
variable when it is set, and the environment variable
`GIT_EDITOR` is not set. See linkgit:git-var[1].
+sequence.editor::
+ Text editor used by `git rebase -i` for editing the rebase insn file.
+ The value is meant to be interpreted by the shell when it is used.
+ It can be overridden by the `GIT_SEQUENCE_EDITOR` environment variable.
+ When not configured the default commit message editor is used instead.
+
core.pager::
The command that git will use to paginate output. Can
be overridden with the `GIT_PAGER` environment
@@ -567,6 +579,12 @@ core.sparseCheckout::
Enable "sparse checkout" feature. See section "Sparse checkout" in
linkgit:git-read-tree[1] for more information.
+core.abbrev::
+ Set the length object names are abbreviated to. If unspecified,
+ many commands abbreviate to 7 hexdigits, which may not be enough
+ for abbreviated object names to stay unique for sufficiently long
+ time.
+
add.ignore-errors::
add.ignoreErrors::
Tells 'git add' to continue adding files when some files cannot be
@@ -592,6 +610,8 @@ it will be treated as a shell command. For example, defining
"gitk --all --not ORIG_HEAD". Note that shell commands will be
executed from the top-level directory of a repository, which may
not necessarily be the current directory.
+'GIT_PREFIX' is set as returned by running 'git rev-parse --show-prefix'
+from the original current directory. See linkgit:git-rev-parse[1].
am.keepcr::
If true, git-am will call git-mailsplit for patches in mbox format
@@ -646,7 +666,7 @@ branch.<name>.remote::
branch.<name>.merge::
Defines, together with branch.<name>.remote, the upstream branch
- for the given branch. It tells 'git fetch'/'git pull' which
+ for the given branch. It tells 'git fetch'/'git pull'/'git rebase' which
branch to merge and can also affect 'git push' (see push.default).
When in branch <name>, it tells 'git fetch' the default
refspec to be marked for merging in FETCH_HEAD. The value is
@@ -671,15 +691,17 @@ branch.<name>.mergeoptions::
branch.<name>.rebase::
When true, rebase the branch <name> on top of the fetched branch,
instead of merging the default branch from the default remote when
- "git pull" is run.
- *NOTE*: this is a possibly dangerous operation; do *not* use
- it unless you understand the implications (see linkgit:git-rebase[1]
- for details).
+ "git pull" is run. See "pull.rebase" for doing this in a non
+ branch-specific manner.
++
+*NOTE*: this is a possibly dangerous operation; do *not* use
+it unless you understand the implications (see linkgit:git-rebase[1]
+for details).
browser.<tool>.cmd::
Specify the command to invoke the specified browser. The
specified command is evaluated in shell with the URLs passed
- as arguments. (See linkgit:git-web--browse[1].)
+ as arguments. (See linkgit:git-web{litdd}browse[1].)
browser.<tool>.path::
Override the path for the given tool that may be used to
@@ -711,9 +733,16 @@ second is the background. The position of the attribute, if any,
doesn't matter.
color.diff::
- When set to `always`, always use colors in patch.
- When false (or `never`), never. When set to `true` or `auto`, use
- colors only when the output is to the terminal. Defaults to false.
+ Whether to use ANSI escape sequences to add color to patches.
+ If this is set to `always`, linkgit:git-diff[1],
+ linkgit:git-log[1], and linkgit:git-show[1] will use color
+ for all patches. If it is set to `true` or `auto`, those
+ commands will only use color when output is to the terminal.
+ Defaults to false.
++
+This does not affect linkgit:git-format-patch[1] nor the
+'git-diff-{asterisk}' plumbing commands. Can be overridden on the
+command line with the `--color[=<when>]` option.
color.diff.<slot>::
Use customized color for diff colorization. `<slot>` specifies
@@ -799,11 +828,15 @@ color.status.<slot>::
color.branch.<slot>.
color.ui::
- When set to `always`, always use colors in all git commands which
- are capable of colored output. When false (or `never`), never. When
- set to `true` or `auto`, use colors only when the output is to the
- terminal. When more specific variables of color.* are set, they always
- take precedence over this setting. Defaults to false.
+ This variable determines the default value for variables such
+ as `color.diff` and `color.grep` that control the use of color
+ per command family. Its scope will expand as more commands learn
+ configuration to set a default for the `--color` option. Set it
+ to `always` if you want all output not intended for machine
+ consumption to use color, to `true` or `auto` if you want such
+ output to use color when written to the terminal, or to `false` or
+ `never` if you prefer git commands not to use color unless enabled
+ explicitly with some other configuration or the `--color` option.
commit.status::
A boolean to enable/disable inclusion of status information in the
@@ -815,68 +848,30 @@ commit.template::
"{tilde}/" is expanded to the value of `$HOME` and "{tilde}user/" to the
specified user's home directory.
-diff.autorefreshindex::
- When using 'git diff' to compare with work tree
- files, do not consider stat-only change as changed.
- Instead, silently run `git update-index --refresh` to
- update the cached stat information for paths whose
- contents in the work tree match the contents in the
- index. This option defaults to true. Note that this
- affects only 'git diff' Porcelain, and not lower level
- 'diff' commands such as 'git diff-files'.
-
-diff.external::
- If this config variable is set, diff generation is not
- performed using the internal diff machinery, but using the
- given command. Can be overridden with the `GIT_EXTERNAL_DIFF'
- environment variable. The command is called with parameters
- as described under "git Diffs" in linkgit:git[1]. Note: if
- you want to use an external diff program only on a subset of
- your files, you might want to use linkgit:gitattributes[5] instead.
-
-diff.mnemonicprefix::
- If set, 'git diff' uses a prefix pair that is different from the
- standard "a/" and "b/" depending on what is being compared. When
- this configuration is in effect, reverse diff output also swaps
- the order of the prefixes:
-`git diff`;;
- compares the (i)ndex and the (w)ork tree;
-`git diff HEAD`;;
- compares a (c)ommit and the (w)ork tree;
-`git diff --cached`;;
- compares a (c)ommit and the (i)ndex;
-`git diff HEAD:file1 file2`;;
- compares an (o)bject and a (w)ork tree entity;
-`git diff --no-index a b`;;
- compares two non-git things (1) and (2).
-
-diff.noprefix::
- If set, 'git diff' does not show any source or destination prefix.
-
-diff.renameLimit::
- The number of files to consider when performing the copy/rename
- detection; equivalent to the 'git diff' option '-l'.
-
-diff.renames::
- Tells git to detect renames. If set to any boolean value, it
- will enable basic rename detection. If set to "copies" or
- "copy", it will detect copies, as well.
-
-diff.ignoreSubmodules::
- Sets the default value of --ignore-submodules. Note that this
- affects only 'git diff' Porcelain, and not lower level 'diff'
- commands such as 'git diff-files'. 'git checkout' also honors
- this setting when reporting uncommitted changes.
-
-diff.suppressBlankEmpty::
- A boolean to inhibit the standard behavior of printing a space
- before each empty output line. Defaults to false.
-
-diff.tool::
- Controls which diff tool is used. `diff.tool` overrides
- `merge.tool` when used by linkgit:git-difftool[1] and has
- the same valid values as `merge.tool` minus "tortoisemerge"
- and plus "kompare".
+credential.helper::
+ Specify an external helper to be called when a username or
+ password credential is needed; the helper may consult external
+ storage to avoid prompting the user for the credentials. See
+ linkgit:gitcredentials[7] for details.
+
+credential.useHttpPath::
+ When acquiring credentials, consider the "path" component of an http
+ or https URL to be important. Defaults to false. See
+ linkgit:gitcredentials[7] for more information.
+
+credential.username::
+ If no username is set for a network authentication, use this username
+ by default. See credential.<context>.* below, and
+ linkgit:gitcredentials[7].
+
+credential.<url>.*::
+ Any of the credential.* options above can be applied selectively to
+ some credentials. For example "credential.https://example.com.username"
+ would set the default username only for https connections to
+ example.com. See linkgit:gitcredentials[7] for details on how URLs are
+ matched.
+
+include::diff-config.txt[]
difftool.<tool>.path::
Override the path for the given tool. This is useful in case
@@ -900,9 +895,20 @@ diff.wordRegex::
characters are *ignorable* whitespace.
fetch.recurseSubmodules::
- A boolean value which changes the behavior for fetch and pull, the
- default is to not recursively fetch populated submodules unless
- configured otherwise.
+ This option can be either set to a boolean value or to 'on-demand'.
+ Setting it to a boolean changes the behavior of fetch and pull to
+ unconditionally recurse into submodules when set to true or to not
+ recurse at all when set to false. When set to 'on-demand' (the default
+ value), fetch and pull will only recurse into a populated submodule
+ when its superproject retrieves a commit that updates the submodule's
+ reference.
+
+fetch.fsckObjects::
+ If it is set to true, git-fetch-pack will check all fetched
+ objects. It will abort in the case of a malformed object or a
+ broken link. The result of an abort are only dangling objects.
+ Defaults to false. If not set, the value of `transfer.fsckObjects`
+ is used instead.
fetch.unpackLimit::
If the number of objects fetched over the git native
@@ -976,6 +982,16 @@ format.signoff::
the rights to submit this work under the same open source license.
Please see the 'SubmittingPatches' document for further discussion.
+filter.<driver>.clean::
+ The command which is used to convert the content of a worktree
+ file to a blob upon checkin. See linkgit:gitattributes[5] for
+ details.
+
+filter.<driver>.smudge::
+ The command which is used to convert the content of a blob
+ object to a worktree file upon checkout. See
+ linkgit:gitattributes[5] for details.
+
gc.aggressiveWindow::
The window size parameter used in the delta compression
algorithm used by 'git gc --aggressive'. This defaults
@@ -1101,6 +1117,40 @@ All gitcvs variables except for 'gitcvs.usecrlfattr' and
is one of "ext" and "pserver") to make them apply only for the given
access method.
+gitweb.category::
+gitweb.description::
+gitweb.owner::
+gitweb.url::
+ See linkgit:gitweb[1] for description.
+
+gitweb.avatar::
+gitweb.blame::
+gitweb.grep::
+gitweb.highlight::
+gitweb.patches::
+gitweb.pickaxe::
+gitweb.remote_heads::
+gitweb.showsizes::
+gitweb.snapshot::
+ See linkgit:gitweb.conf[5] for description.
+
+grep.lineNumber::
+ If set to true, enable '-n' option by default.
+
+grep.extendedRegexp::
+ If set to true, enable '--extended-regexp' option by default.
+
+gpg.program::
+ Use this custom program instead of "gpg" found on $PATH when
+ making or verifying a PGP signature. The program must support the
+ same command line interface as GPG, namely, to verify a detached
+ signature, "gpg --verify $file - <$signature" is run, and the
+ program is expected to signal a good signature by exiting with
+ code 0, and to generate an ascii-armored detached signature, the
+ standard input of "gpg -bsau $key" is fed with the contents to be
+ signed, and the program is expected to send the result to its
+ standard output.
+
gui.commitmsgwidth::
Defines how wide the commit message window is in the
linkgit:git-gui[1]. "75" is the default.
@@ -1225,9 +1275,18 @@ help.autocorrect::
This is the default.
http.proxy::
- Override the HTTP proxy, normally configured using the 'http_proxy'
- environment variable (see linkgit:curl[1]). This can be overridden
- on a per-remote basis; see remote.<name>.proxy
+ Override the HTTP proxy, normally configured using the 'http_proxy',
+ 'https_proxy', and 'all_proxy' environment variables (see
+ `curl(1)`). This can be overridden on a per-remote basis; see
+ remote.<name>.proxy
+
+http.cookiefile::
+ File containing previously stored cookie lines which should be used
+ in the git http session, if they match the server. The file format
+ of the file to read cookies from should be plain HTTP headers or
+ the Netscape/Mozilla cookie file format (see linkgit:curl[1]).
+ NOTE that the file specified with http.cookiefile is only used as
+ input. No cookies will be stored in the file.
http.sslVerify::
Whether to verify the SSL certificate when fetching or pushing
@@ -1342,9 +1401,16 @@ instaweb.port::
interactive.singlekey::
In interactive commands, allow the user to provide one-letter
input with a single key (i.e., without hitting enter).
- Currently this is used only by the `\--patch` mode of
- linkgit:git-add[1]. Note that this setting is silently
- ignored if portable keystroke input is not available.
+ Currently this is used by the `\--patch` mode of
+ linkgit:git-add[1], linkgit:git-checkout[1], linkgit:git-commit[1],
+ linkgit:git-reset[1], and linkgit:git-stash[1]. Note that this
+ setting is silently ignored if portable keystroke input
+ is not available.
+
+log.abbrevCommit::
+ If true, makes linkgit:git-log[1], linkgit:git-show[1], and
+ linkgit:git-whatchanged[1] assume `\--abbrev-commit`. You may
+ override this option with `\--no-abbrev-commit`.
log.date::
Set the default date-time mode for the 'log' command.
@@ -1469,7 +1535,8 @@ notes.rewriteRef::
You may also specify this configuration several times.
+
Does not have a default value; you must configure this variable to
-enable note rewriting.
+enable note rewriting. Set it to `refs/notes/commits` to enable
+rewriting for the default commit notes.
+
This setting can be overridden with the `GIT_NOTES_REWRITE_REF`
environment variable, which must be a colon separated list of refs or
@@ -1574,6 +1641,16 @@ pretty.<name>::
Note that an alias with the same name as a built-in format
will be silently ignored.
+pull.rebase::
+ When true, rebase branches on top of the fetched branch, instead
+ of merging the default branch from the default remote when "git
+ pull" is run. See "branch.<name>.rebase" for setting this on a
+ per-branch basis.
++
+*NOTE*: this is a possibly dangerous operation; do *not* use
+it unless you understand the implications (see linkgit:git-rebase[1]
+for details).
+
pull.octopus::
The default merge strategy to use when pulling multiple branches
at once.
@@ -1591,7 +1668,8 @@ push.default::
* `matching` - push all matching branches.
All branches having the same name in both ends are considered to be
matching. This is the default.
-* `tracking` - push the current branch to its upstream branch.
+* `upstream` - push the current branch to its upstream branch.
+* `tracking` - deprecated synonym for `upstream`.
* `current` - push the current branch to a branch of the same name.
rebase.stat::
@@ -1610,7 +1688,8 @@ receive.fsckObjects::
If it is set to true, git-receive-pack will check all received
objects. It will abort in the case of a malformed object or a
broken link. The result of an abort are only dangling objects.
- Defaults to false.
+ Defaults to false. If not set, the value of `transfer.fsckObjects`
+ is used instead.
receive.unpackLimit::
If the number of objects received in a push is below this
@@ -1722,10 +1801,11 @@ rerere.autoupdate::
rerere.enabled::
Activate recording of resolved conflicts, so that identical
- conflict hunks can be resolved automatically, should they
- be encountered again. linkgit:git-rerere[1] command is by
- default enabled if you create `rr-cache` directory under
- `$GIT_DIR`, but can be disabled by setting this option to false.
+ conflict hunks can be resolved automatically, should they be
+ encountered again. By default, linkgit:git-rerere[1] is
+ enabled if there is an `rr-cache` directory under the
+ `$GIT_DIR`, e.g. if "rerere" was previously used in the
+ repository.
sendemail.identity::
A configuration identity. When given, causes values in the
@@ -1819,7 +1899,7 @@ submodule.<name>.update::
linkgit:git-submodule[1] and linkgit:gitmodules[5] for details.
submodule.<name>.fetchRecurseSubmodules::
- This option can be used to enable/disable recursive fetching of this
+ This option can be used to control recursive fetching of this
submodule. It can be overridden by using the --[no-]recurse-submodules
command line option to "git fetch" and "git pull".
This setting will override that from in the linkgit:gitmodules[5]
@@ -1845,6 +1925,11 @@ tar.umask::
archiving user's umask will be used instead. See umask(2) and
linkgit:git-archive[1].
+transfer.fsckObjects::
+ When `fetch.fsckObjects` or `receive.fsckObjects` are
+ not set, the value of this variable is used instead.
+ Defaults to false.
+
transfer.unpackLimit::
When `fetch.unpackLimit` or `receive.unpackLimit` are
not set, the value of this variable is used instead.