blob: b0169f7545a03be7352b1bbb90ddf5fcf12b365a [file] [log] [blame]
'\" t
.\" Title: git-config
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 11/18/2018
.\" Manual: Git Manual
.\" Source: Git 2.20.0.rc0
.\" Language: English
.\"
.TH "GIT\-CONFIG" "1" "11/18/2018" "Git 2\&.20\&.0\&.rc0" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-config \- Get and set repository or global options
.SH "SYNOPSIS"
.sp
.nf
\fIgit config\fR [<file\-option>] [\-\-type=<type>] [\-\-show\-origin] [\-z|\-\-null] name [value [value_regex]]
\fIgit config\fR [<file\-option>] [\-\-type=<type>] \-\-add name value
\fIgit config\fR [<file\-option>] [\-\-type=<type>] \-\-replace\-all name value [value_regex]
\fIgit config\fR [<file\-option>] [\-\-type=<type>] [\-\-show\-origin] [\-z|\-\-null] \-\-get name [value_regex]
\fIgit config\fR [<file\-option>] [\-\-type=<type>] [\-\-show\-origin] [\-z|\-\-null] \-\-get\-all name [value_regex]
\fIgit config\fR [<file\-option>] [\-\-type=<type>] [\-\-show\-origin] [\-z|\-\-null] [\-\-name\-only] \-\-get\-regexp name_regex [value_regex]
\fIgit config\fR [<file\-option>] [\-\-type=<type>] [\-z|\-\-null] \-\-get\-urlmatch name URL
\fIgit config\fR [<file\-option>] \-\-unset name [value_regex]
\fIgit config\fR [<file\-option>] \-\-unset\-all name [value_regex]
\fIgit config\fR [<file\-option>] \-\-rename\-section old_name new_name
\fIgit config\fR [<file\-option>] \-\-remove\-section name
\fIgit config\fR [<file\-option>] [\-\-show\-origin] [\-z|\-\-null] [\-\-name\-only] \-l | \-\-list
\fIgit config\fR [<file\-option>] \-\-get\-color name [default]
\fIgit config\fR [<file\-option>] \-\-get\-colorbool name [stdout\-is\-tty]
\fIgit config\fR [<file\-option>] \-e | \-\-edit
.fi
.sp
.SH "DESCRIPTION"
.sp
You can query/set/replace/unset options with this command\&. The name is actually the section and the key separated by a dot, and the value will be escaped\&.
.sp
Multiple lines can be added to an option by using the \fB\-\-add\fR option\&. If you want to update or unset an option which can occur on multiple lines, a POSIX regexp \fBvalue_regex\fR needs to be given\&. Only the existing values that match the regexp are updated or unset\&. If you want to handle the lines that do \fBnot\fR match the regex, just prepend a single exclamation mark in front (see also the section called \(lqEXAMPLES\(rq)\&.
.sp
The \fB\-\-type=<type>\fR option instructs \fIgit config\fR to ensure that incoming and outgoing values are canonicalize\-able under the given <type>\&. If no \fB\-\-type=<type>\fR is given, no canonicalization will be performed\&. Callers may unset an existing \fB\-\-type\fR specifier with \fB\-\-no\-type\fR\&.
.sp
When reading, the values are read from the system, global and repository local configuration files by default, and options \fB\-\-system\fR, \fB\-\-global\fR, \fB\-\-local\fR, \fB\-\-worktree\fR and \fB\-\-file <filename>\fR can be used to tell the command to read from only that location (see the section called \(lqFILES\(rq)\&.
.sp
When writing, the new value is written to the repository local configuration file by default, and options \fB\-\-system\fR, \fB\-\-global\fR, \fB\-\-worktree\fR, \fB\-\-file <filename>\fR can be used to tell the command to write to that location (you can say \fB\-\-local\fR but that is the default)\&.
.sp
This command will fail with non\-zero status upon error\&. Some exit codes are:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The section or key is invalid (ret=1),
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
no section or name was provided (ret=2),
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
the config file is invalid (ret=3),
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
the config file cannot be written (ret=4),
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
you try to unset an option which does not exist (ret=5),
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
you try to unset/set an option for which multiple lines match (ret=5), or
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
you try to use an invalid regexp (ret=6)\&.
.RE
.sp
On success, the command returns the exit code 0\&.
.SH "OPTIONS"
.PP
\-\-replace\-all
.RS 4
Default behavior is to replace at most one line\&. This replaces all lines matching the key (and optionally the value_regex)\&.
.RE
.PP
\-\-add
.RS 4
Adds a new line to the option without altering any existing values\&. This is the same as providing
\fI^$\fR
as the value_regex in
\fB\-\-replace\-all\fR\&.
.RE
.PP
\-\-get
.RS 4
Get the value for a given key (optionally filtered by a regex matching the value)\&. Returns error code 1 if the key was not found and the last value if multiple key values were found\&.
.RE
.PP
\-\-get\-all
.RS 4
Like get, but returns all values for a multi\-valued key\&.
.RE
.PP
\-\-get\-regexp
.RS 4
Like \-\-get\-all, but interprets the name as a regular expression and writes out the key names\&. Regular expression matching is currently case\-sensitive and done against a canonicalized version of the key in which section and variable names are lowercased, but subsection names are not\&.
.RE
.PP
\-\-get\-urlmatch name URL
.RS 4
When given a two\-part name section\&.key, the value for section\&.<url>\&.key whose <url> part matches the best to the given URL is returned (if no such key exists, the value for section\&.key is used as a fallback)\&. When given just the section as name, do so for all the keys in the section and list them\&. Returns error code 1 if no value is found\&.
.RE
.PP
\-\-global
.RS 4
For writing options: write to global
\fB~/\&.gitconfig\fR
file rather than the repository
\fB\&.git/config\fR, write to
\fB$XDG_CONFIG_HOME/git/config\fR
file if this file exists and the
\fB~/\&.gitconfig\fR
file doesn\(cqt\&.
.sp
For reading options: read only from global
\fB~/\&.gitconfig\fR
and from
\fB$XDG_CONFIG_HOME/git/config\fR
rather than from all available files\&.
.sp
See also
the section called \(lqFILES\(rq\&.
.RE
.PP
\-\-system
.RS 4
For writing options: write to system\-wide
\fB$(prefix)/etc/gitconfig\fR
rather than the repository
\fB\&.git/config\fR\&.
.sp
For reading options: read only from system\-wide
\fB$(prefix)/etc/gitconfig\fR
rather than from all available files\&.
.sp
See also
the section called \(lqFILES\(rq\&.
.RE
.PP
\-\-local
.RS 4
For writing options: write to the repository
\fB\&.git/config\fR
file\&. This is the default behavior\&.
.sp
For reading options: read only from the repository
\fB\&.git/config\fR
rather than from all available files\&.
.sp
See also
the section called \(lqFILES\(rq\&.
.RE
.PP
\-\-worktree
.RS 4
Similar to
\fB\-\-local\fR
except that
\fB\&.git/config\&.worktree\fR
is read from or written to if
\fBextensions\&.worktreeConfig\fR
is present\&. If not it\(cqs the same as
\fB\-\-local\fR\&.
.RE
.PP
\-f config\-file, \-\-file config\-file
.RS 4
Use the given config file instead of the one specified by GIT_CONFIG\&.
.RE
.PP
\-\-blob blob
.RS 4
Similar to
\fB\-\-file\fR
but use the given blob instead of a file\&. E\&.g\&. you can use
\fImaster:\&.gitmodules\fR
to read values from the file
\fI\&.gitmodules\fR
in the master branch\&. See "SPECIFYING REVISIONS" section in
\fBgitrevisions\fR(7)
for a more complete list of ways to spell blob names\&.
.RE
.PP
\-\-remove\-section
.RS 4
Remove the given section from the configuration file\&.
.RE
.PP
\-\-rename\-section
.RS 4
Rename the given section to a new name\&.
.RE
.PP
\-\-unset
.RS 4
Remove the line matching the key from config file\&.
.RE
.PP
\-\-unset\-all
.RS 4
Remove all lines matching the key from config file\&.
.RE
.PP
\-l, \-\-list
.RS 4
List all variables set in config file, along with their values\&.
.RE
.PP
\-\-type <type>
.RS 4
\fIgit config\fR
will ensure that any input or output is valid under the given type constraint(s), and will canonicalize outgoing values in
\fB<type>\fR\(aqs canonical form\&.
.sp
Valid
\fB<type>\fR\(aqs include:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIbool\fR: canonicalize values as either "true" or "false"\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIint\fR: canonicalize values as simple decimal numbers\&. An optional suffix of
\fIk\fR,
\fIm\fR, or
\fIg\fR
will cause the value to be multiplied by 1024, 1048576, or 1073741824 upon input\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIbool\-or\-int\fR: canonicalize according to either
\fIbool\fR
or
\fIint\fR, as described above\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIpath\fR: canonicalize by adding a leading
\fB~\fR
to the value of
\fB$HOME\fR
and
\fB~user\fR
to the home directory for the specified user\&. This specifier has no effect when setting the value (but you can use
\fBgit config section\&.variable ~/\fR
from the command line to let your shell do the expansion\&.)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIexpiry\-date\fR: canonicalize by converting from a fixed or relative date\-string to a timestamp\&. This specifier has no effect when setting the value\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIcolor\fR: When getting a value, canonicalize by converting to an ANSI color escape sequence\&. When setting a value, a sanity\-check is performed to ensure that the given value is canonicalize\-able as an ANSI color, but it is written as\-is\&.
.RE
.RE
.PP
\-\-bool, \-\-int, \-\-bool\-or\-int, \-\-path, \-\-expiry\-date
.RS 4
Historical options for selecting a type specifier\&. Prefer instead
\fB\-\-type\fR
(see above)\&.
.RE
.PP
\-\-no\-type
.RS 4
Un\-sets the previously set type specifier (if one was previously set)\&. This option requests that
\fIgit config\fR
not canonicalize the retrieved variable\&.
\fB\-\-no\-type\fR
has no effect without
\fB\-\-type=<type>\fR
or
\fB\-\-<type>\fR\&.
.RE
.PP
\-z, \-\-null
.RS 4
For all options that output values and/or keys, always end values with the null character (instead of a newline)\&. Use newline instead as a delimiter between key and value\&. This allows for secure parsing of the output without getting confused e\&.g\&. by values that contain line breaks\&.
.RE
.PP
\-\-name\-only
.RS 4
Output only the names of config variables for
\fB\-\-list\fR
or
\fB\-\-get\-regexp\fR\&.
.RE
.PP
\-\-show\-origin
.RS 4
Augment the output of all queried config options with the origin type (file, standard input, blob, command line) and the actual origin (config file path, ref, or blob id if applicable)\&.
.RE
.PP
\-\-get\-colorbool name [stdout\-is\-tty]
.RS 4
Find the color setting for
\fBname\fR
(e\&.g\&.
\fBcolor\&.diff\fR) and output "true" or "false"\&.
\fBstdout\-is\-tty\fR
should be either "true" or "false", and is taken into account when configuration says "auto"\&. If
\fBstdout\-is\-tty\fR
is missing, then checks the standard output of the command itself, and exits with status 0 if color is to be used, or exits with status 1 otherwise\&. When the color setting for
\fBname\fR
is undefined, the command uses
\fBcolor\&.ui\fR
as fallback\&.
.RE
.PP
\-\-get\-color name [default]
.RS 4
Find the color configured for
\fBname\fR
(e\&.g\&.
\fBcolor\&.diff\&.new\fR) and output it as the ANSI color escape sequence to the standard output\&. The optional
\fBdefault\fR
parameter is used instead, if there is no color configured for
\fBname\fR\&.
.sp
\fB\-\-type=color [\-\-default=<default>]\fR
is preferred over
\fB\-\-get\-color\fR\&.
.RE
.PP
\-e, \-\-edit
.RS 4
Opens an editor to modify the specified config file; either
\fB\-\-system\fR,
\fB\-\-global\fR, or repository (default)\&.
.RE
.PP
\-\-[no\-]includes
.RS 4
Respect
\fBinclude\&.*\fR
directives in config files when looking up values\&. Defaults to
\fBoff\fR
when a specific file is given (e\&.g\&., using
\fB\-\-file\fR,
\fB\-\-global\fR, etc) and
\fBon\fR
when searching all config files\&.
.RE
.PP
\-\-default <value>
.RS 4
When using
\fB\-\-get\fR, and the requested variable is not found, behave as if <value> were the value assigned to the that variable\&.
.RE
.SH "CONFIGURATION"
.sp
\fBpager\&.config\fR is only respected when listing configuration, i\&.e\&., when using \fB\-\-list\fR or any of the \fB\-\-get\-*\fR which may return multiple results\&. The default is to use a pager\&.
.SH "FILES"
.sp
If not set explicitly with \fB\-\-file\fR, there are four files where \fIgit config\fR will search for configuration options:
.PP
$(prefix)/etc/gitconfig
.RS 4
System\-wide configuration file\&.
.RE
.PP
$XDG_CONFIG_HOME/git/config
.RS 4
Second user\-specific configuration file\&. If $XDG_CONFIG_HOME is not set or empty,
\fB$HOME/\&.config/git/config\fR
will be used\&. Any single\-valued variable set in this file will be overwritten by whatever is in
\fB~/\&.gitconfig\fR\&. 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\&.
.RE
.PP
~/\&.gitconfig
.RS 4
User\-specific configuration file\&. Also called "global" configuration file\&.
.RE
.PP
$GIT_DIR/config
.RS 4
Repository specific configuration file\&.
.RE
.PP
$GIT_DIR/config\&.worktree
.RS 4
This is optional and is only searched when
\fBextensions\&.worktreeConfig\fR
is present in $GIT_DIR/config\&.
.RE
.sp
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 file are not available they will be ignored\&. If the repository configuration file is not available or readable, \fIgit config\fR will exit with a non\-zero error code\&. However, in neither case will an error message be issued\&.
.sp
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\&.
.sp
You may override individual configuration parameters when running any git command by using the \fB\-c\fR option\&. See \fBgit\fR(1) for details\&.
.sp
All writing options will per default write to the repository specific configuration file\&. Note that this also affects options like \fB\-\-replace\-all\fR and \fB\-\-unset\fR\&. \fB\fIgit config\fR\fR\fB will only ever change one file at a time\fR\&.
.sp
You can override these rules either by command\-line options or by environment variables\&. The \fB\-\-global\fR, \fB\-\-system\fR and \fB\-\-worktree\fR options will limit the file used to the global, system\-wide or per\-worktree file respectively\&. The \fBGIT_CONFIG\fR environment variable has a similar effect, but you can specify any filename you want\&.
.SH "ENVIRONMENT"
.PP
GIT_CONFIG
.RS 4
Take the configuration from the given file instead of \&.git/config\&. Using the "\-\-global" option forces this to ~/\&.gitconfig\&. Using the "\-\-system" option forces this to $(prefix)/etc/gitconfig\&.
.RE
.PP
GIT_CONFIG_NOSYSTEM
.RS 4
Whether to skip reading settings from the system\-wide $(prefix)/etc/gitconfig file\&. See
\fBgit\fR(1)
for details\&.
.RE
.sp
See also the section called \(lqFILES\(rq\&.
.SH "EXAMPLES"
.sp
Given a \&.git/config like this:
.sp
.if n \{\
.RS 4
.\}
.nf
#
# This is the config file, and
# a \(aq#\(aq or \(aq;\(aq character indicates
# a comment
#
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
; core variables
[core]
; Don\(aqt trust file modes
filemode = false
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
; Our diff algorithm
[diff]
external = /usr/local/bin/diff\-wrapper
renames = true
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
; Proxy settings
[core]
gitproxy=proxy\-command for kernel\&.org
gitproxy=default\-proxy ; for all the rest
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
; HTTP
[http]
sslVerify
[http "https://weak\&.example\&.com"]
sslVerify = false
cookieFile = /tmp/cookie\&.txt
.fi
.if n \{\
.RE
.\}
.sp
you can set the filemode to true with
.sp
.if n \{\
.RS 4
.\}
.nf
% git config core\&.filemode true
.fi
.if n \{\
.RE
.\}
.sp
.sp
The hypothetical proxy command entries actually have a postfix to discern what URL they apply to\&. Here is how to change the entry for kernel\&.org to "ssh"\&.
.sp
.if n \{\
.RS 4
.\}
.nf
% git config core\&.gitproxy \(aq"ssh" for kernel\&.org\(aq \(aqfor kernel\&.org$\(aq
.fi
.if n \{\
.RE
.\}
.sp
.sp
This makes sure that only the key/value pair for kernel\&.org is replaced\&.
.sp
To delete the entry for renames, do
.sp
.if n \{\
.RS 4
.\}
.nf
% git config \-\-unset diff\&.renames
.fi
.if n \{\
.RE
.\}
.sp
.sp
If you want to delete an entry for a multivar (like core\&.gitproxy above), you have to provide a regex matching the value of exactly one line\&.
.sp
To query the value for a given key, do
.sp
.if n \{\
.RS 4
.\}
.nf
% git config \-\-get core\&.filemode
.fi
.if n \{\
.RE
.\}
.sp
.sp
or
.sp
.if n \{\
.RS 4
.\}
.nf
% git config core\&.filemode
.fi
.if n \{\
.RE
.\}
.sp
.sp
or, to query a multivar:
.sp
.if n \{\
.RS 4
.\}
.nf
% git config \-\-get core\&.gitproxy "for kernel\&.org$"
.fi
.if n \{\
.RE
.\}
.sp
.sp
If you want to know all the values for a multivar, do:
.sp
.if n \{\
.RS 4
.\}
.nf
% git config \-\-get\-all core\&.gitproxy
.fi
.if n \{\
.RE
.\}
.sp
.sp
If you like to live dangerously, you can replace \fBall\fR core\&.gitproxy by a new one with
.sp
.if n \{\
.RS 4
.\}
.nf
% git config \-\-replace\-all core\&.gitproxy ssh
.fi
.if n \{\
.RE
.\}
.sp
.sp
However, if you really only want to replace the line for the default proxy, i\&.e\&. the one without a "for \&..." postfix, do something like this:
.sp
.if n \{\
.RS 4
.\}
.nf
% git config core\&.gitproxy ssh \(aq! for \(aq
.fi
.if n \{\
.RE
.\}
.sp
.sp
To actually match only values with an exclamation mark, you have to
.sp
.if n \{\
.RS 4
.\}
.nf
% git config section\&.key value \(aq[!]\(aq
.fi
.if n \{\
.RE
.\}
.sp
.sp
To add a new proxy, without altering any of the existing ones, use
.sp
.if n \{\
.RS 4
.\}
.nf
% git config \-\-add core\&.gitproxy \(aq"proxy\-command" for example\&.com\(aq
.fi
.if n \{\
.RE
.\}
.sp
.sp
An example to use customized color from the configuration in your script:
.sp
.if n \{\
.RS 4
.\}
.nf
#!/bin/sh
WS=$(git config \-\-get\-color color\&.diff\&.whitespace "blue reverse")
RESET=$(git config \-\-get\-color "" "reset")
echo "${WS}your whitespace color or blue reverse${RESET}"
.fi
.if n \{\
.RE
.\}
.sp
.sp
For URLs in \fBhttps://weak\&.example\&.com\fR, \fBhttp\&.sslVerify\fR is set to false, while it is set to \fBtrue\fR for all others:
.sp
.if n \{\
.RS 4
.\}
.nf
% git config \-\-type=bool \-\-get\-urlmatch http\&.sslverify https://good\&.example\&.com
true
% git config \-\-type=bool \-\-get\-urlmatch http\&.sslverify https://weak\&.example\&.com
false
% git config \-\-get\-urlmatch http https://weak\&.example\&.com
http\&.cookieFile /tmp/cookie\&.txt
http\&.sslverify false
.fi
.if n \{\
.RE
.\}
.sp
.SH "CONFIGURATION FILE"
.sp
The Git configuration file contains a number of variables that affect the Git commands\(aq behavior\&. The files \fB\&.git/config\fR and optionally \fBconfig\&.worktree\fR (see \fBextensions\&.worktreeConfig\fR below) in each repository are used to store the configuration for that repository, and \fB$HOME/\&.gitconfig\fR is used to store a per\-user configuration as fallback values for the \fB\&.git/config\fR file\&. The file \fB/etc/gitconfig\fR can be used to store a system\-wide default configuration\&.
.sp
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, allow only alphanumeric characters and \fB\-\fR, and must start with an alphabetic character\&. Some variables may appear multiple times; we say then that the variable is multivalued\&.
.SS "Syntax"
.sp
The syntax is fairly flexible and permissive; whitespaces are mostly ignored\&. The \fI#\fR and \fI;\fR characters begin comments to the end of line, blank lines are ignored\&.
.sp
The file consists of sections and variables\&. A section begins with the name of the section in square brackets and continues until the next section begins\&. Section names are case\-insensitive\&. Only alphanumeric characters, \fB\-\fR and \fB\&.\fR are allowed in section names\&. Each variable must belong to some section, which means that there must be a section header before the first setting of a variable\&.
.sp
Sections can be further divided into subsections\&. To begin a subsection put its name in double quotes, separated by space from the section name, in the section header, like in the example below:
.sp
.if n \{\
.RS 4
.\}
.nf
[section "subsection"]
.fi
.if n \{\
.RE
.\}
.sp
.sp
Subsection names are case sensitive and can contain any characters except newline and the null byte\&. Doublequote \fB"\fR and backslash can be included by escaping them as \fB\e"\fR and \fB\e\e\fR, respectively\&. Backslashes preceding other characters are dropped when reading; for example, \fB\et\fR is read as \fBt\fR and \fB\e0\fR is read as \fB0\fR Section headers cannot span multiple lines\&. Variables may belong directly to a section or to a given subsection\&. You can have \fB[section]\fR if you have \fB[section "subsection"]\fR, but you don\(cqt need to\&.
.sp
There is also a deprecated \fB[section\&.subsection]\fR 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\&.
.sp
All the other lines (and the remainder of the line after the section header) are recognized as setting variables, in the form \fIname = value\fR (or just \fIname\fR, which is a short\-hand to say that the variable is the boolean "true")\&. The variable names are case\-insensitive, allow only alphanumeric characters and \fB\-\fR, and must start with an alphabetic character\&.
.sp
A line that defines a value can be continued to the next line by ending it with a \fB\e\fR; the backquote and the end\-of\-line are stripped\&. Leading whitespaces after \fIname =\fR, the remainder of the line after the first comment character \fI#\fR or \fI;\fR, and trailing whitespaces of the line are discarded unless they are enclosed in double quotes\&. Internal whitespaces within the value are retained verbatim\&.
.sp
Inside double quotes, double quote \fB"\fR and backslash \fB\e\fR characters must be escaped: use \fB\e"\fR for \fB"\fR and \fB\e\e\fR for \fB\e\fR\&.
.sp
The following escape sequences (beside \fB\e"\fR and \fB\e\e\fR) are recognized: \fB\en\fR for newline character (NL), \fB\et\fR for horizontal tabulation (HT, TAB) and \fB\eb\fR for backspace (BS)\&. Other char escape sequences (including octal escape sequences) are invalid\&.
.SS "Includes"
.sp
The \fBinclude\fR and \fBincludeIf\fR sections allow you to include config directives from another source\&. These sections behave identically to each other with the exception that \fBincludeIf\fR sections may be ignored if their condition does not evaluate to true; see "Conditional includes" below\&.
.sp
You can include a config file from another by setting the special \fBinclude\&.path\fR (or \fBincludeIf\&.*\&.path\fR) variable to the name of the file to be included\&. The variable takes a pathname as its value, and is subject to tilde expansion\&. These variables can be given multiple times\&.
.sp
The contents of the included file are inserted immediately, as if they had been found at the location of the include directive\&. If the value of the 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\&.
.SS "Conditional includes"
.sp
You can include a config file from another conditionally by setting a \fBincludeIf\&.<condition>\&.path\fR variable to the name of the file to be included\&.
.sp
The condition starts with a keyword followed by a colon and some data whose format and meaning depends on the keyword\&. Supported keywords are:
.PP
\fBgitdir\fR
.RS 4
The data that follows the keyword
\fBgitdir:\fR
is used as a glob pattern\&. If the location of the \&.git directory matches the pattern, the include condition is met\&.
.sp
The \&.git location may be auto\-discovered, or come from
\fB$GIT_DIR\fR
environment variable\&. If the repository is auto discovered via a \&.git file (e\&.g\&. from submodules, or a linked worktree), the \&.git location would be the final location where the \&.git directory is, not where the \&.git file is\&.
.sp
The pattern can contain standard globbing wildcards and two additional ones,
\fB**/\fR
and
\fB/**\fR, that can match multiple path components\&. Please refer to
\fBgitignore\fR(5)
for details\&. For convenience:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the pattern starts with
\fB~/\fR,
\fB~\fR
will be substituted with the content of the environment variable
\fBHOME\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the pattern starts with
\fB\&./\fR, it is replaced with the directory containing the current config file\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the pattern does not start with either
\fB~/\fR,
\fB\&./\fR
or
\fB/\fR,
\fB**/\fR
will be automatically prepended\&. For example, the pattern
\fBfoo/bar\fR
becomes
\fB**/foo/bar\fR
and would match
\fB/any/path/to/foo/bar\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
If the pattern ends with
\fB/\fR,
\fB**\fR
will be automatically added\&. For example, the pattern
\fBfoo/\fR
becomes
\fBfoo/**\fR\&. In other words, it matches "foo" and everything inside, recursively\&.
.RE
.RE
.PP
\fBgitdir/i\fR
.RS 4
This is the same as
\fBgitdir\fR
except that matching is done case\-insensitively (e\&.g\&. on case\-insensitive file sytems)
.RE
.sp
A few more notes on matching via \fBgitdir\fR and \fBgitdir/i\fR:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Symlinks in
\fB$GIT_DIR\fR
are not resolved before matching\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Both the symlink & realpath versions of paths will be matched outside of
\fB$GIT_DIR\fR\&. E\&.g\&. if ~/git is a symlink to /mnt/storage/git, both
\fBgitdir:~/git\fR
and
\fBgitdir:/mnt/storage/git\fR
will match\&.
.sp
This was not the case in the initial release of this feature in v2\&.13\&.0, which only matched the realpath version\&. Configuration that wants to be compatible with the initial release of this feature needs to either specify only the realpath version, or both versions\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Note that "\&.\&./" is not special and will match literally, which is unlikely what you want\&.
.RE
.SS "Example"
.sp
.if n \{\
.RS 4
.\}
.nf
# Core variables
[core]
; Don\(aqt trust file modes
filemode = false
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
# Our diff algorithm
[diff]
external = /usr/local/bin/diff\-wrapper
renames = true
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
[branch "devel"]
remote = origin
merge = refs/heads/devel
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
# Proxy settings
[core]
gitProxy="ssh" for "kernel\&.org"
gitProxy=default\-proxy ; for the rest
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
[include]
path = /path/to/foo\&.inc ; include by absolute path
path = foo\&.inc ; find "foo\&.inc" relative to the current file
path = ~/foo\&.inc ; find "foo\&.inc" in your `$HOME` directory
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
; include if $GIT_DIR is /path/to/foo/\&.git
[includeIf "gitdir:/path/to/foo/\&.git"]
path = /path/to/foo\&.inc
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
; include for all repositories inside /path/to/group
[includeIf "gitdir:/path/to/group/"]
path = /path/to/foo\&.inc
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
; include for all repositories inside $HOME/to/group
[includeIf "gitdir:~/to/group/"]
path = /path/to/foo\&.inc
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
; relative paths are always relative to the including
; file (if the condition is true); their location is not
; affected by the condition
[includeIf "gitdir:/path/to/group/"]
path = foo\&.inc
.fi
.if n \{\
.RE
.\}
.SS "Values"
.sp
Values of many variables are treated as a simple string, but there are variables that take values of specific types and there are rules as to how to spell them\&.
.PP
boolean
.RS 4
When a variable is said to take a boolean value, many synonyms are accepted for
\fItrue\fR
and
\fIfalse\fR; these are all case\-insensitive\&.
.PP
true
.RS 4
Boolean true literals are
\fByes\fR,
\fBon\fR,
\fBtrue\fR, and
\fB1\fR\&. Also, a variable defined without
\fB= <value>\fR
is taken as true\&.
.RE
.PP
false
.RS 4
Boolean false literals are
\fBno\fR,
\fBoff\fR,
\fBfalse\fR,
\fB0\fR
and the empty string\&.
.sp
When converting a value to its canonical form using the
\fB\-\-type=bool\fR
type specifier,
\fIgit config\fR
will ensure that the output is "true" or "false" (spelled in lowercase)\&.
.RE
.RE
.PP
integer
.RS 4
The value for many variables that specify various sizes can be suffixed with
\fBk\fR,
\fBM\fR,\&... to mean "scale the number by 1024", "by 1024x1024", etc\&.
.RE
.PP
color
.RS 4
The value for a variable that takes a color is a list of colors (at most two, one for foreground and one for background) and attributes (as many as you want), separated by spaces\&.
.sp
The basic colors accepted are
\fBnormal\fR,
\fBblack\fR,
\fBred\fR,
\fBgreen\fR,
\fByellow\fR,
\fBblue\fR,
\fBmagenta\fR,
\fBcyan\fR
and
\fBwhite\fR\&. The first color given is the foreground; the second is the background\&.
.sp
Colors may also be given as numbers between 0 and 255; these use ANSI 256\-color mode (but note that not all terminals may support this)\&. If your terminal supports it, you may also specify 24\-bit RGB values as hex, like
\fB#ff0ab3\fR\&.
.sp
The accepted attributes are
\fBbold\fR,
\fBdim\fR,
\fBul\fR,
\fBblink\fR,
\fBreverse\fR,
\fBitalic\fR, and
\fBstrike\fR
(for crossed\-out or "strikethrough" letters)\&. The position of any attributes with respect to the colors (before, after, or in between), doesn\(cqt matter\&. Specific attributes may be turned off by prefixing them with
\fBno\fR
or
\fBno\-\fR
(e\&.g\&.,
\fBnoreverse\fR,
\fBno\-ul\fR, etc)\&.
.sp
An empty color string produces no color effect at all\&. This can be used to avoid coloring specific elements without disabling color entirely\&.
.sp
For git\(cqs pre\-defined color slots, the attributes are meant to be reset at the beginning of each item in the colored output\&. So setting
\fBcolor\&.decorate\&.branch\fR
to
\fBblack\fR
will paint that branch name in a plain
\fBblack\fR, even if the previous thing on the same output line (e\&.g\&. opening parenthesis before the list of branch names in
\fBlog \-\-decorate\fR
output) is set to be painted with
\fBbold\fR
or some other attribute\&. However, custom log formats may do more complicated and layered coloring, and the negated forms may be useful there\&.
.RE
.PP
pathname
.RS 4
A variable that takes a pathname value can be given a string that begins with "\fB~/\fR" or "\fB~user/\fR", and the usual tilde expansion happens to such a string:
\fB~/\fR
is expanded to the value of
\fB$HOME\fR, and
\fB~user/\fR
to the specified user\(cqs home directory\&.
.RE
.SS "Variables"
.sp
Note that this list is non\-comprehensive and not necessarily complete\&. For command\-specific variables, you will find a more detailed description in the appropriate manual page\&.
.sp
Other git\-related tools may and do use their own variables\&. When inventing new variables for use in your own tool, make sure their names do not conflict with those that are used by Git itself and other popular tools, and describe them in your documentation\&.
.PP
advice\&.*
.RS 4
These variables control various optional help messages designed to aid new users\&. All
\fIadvice\&.*\fR
variables default to
\fItrue\fR, and you can tell Git that you do not need help by setting these to
\fIfalse\fR:
.PP
pushUpdateRejected
.RS 4
Set this variable to
\fIfalse\fR
if you want to disable
\fIpushNonFFCurrent\fR,
\fIpushNonFFMatching\fR,
\fIpushAlreadyExists\fR,
\fIpushFetchFirst\fR, and
\fIpushNeedsForce\fR
simultaneously\&.
.RE
.PP
pushNonFFCurrent
.RS 4
Advice shown when
\fBgit-push\fR(1)
fails due to a non\-fast\-forward update to the current branch\&.
.RE
.PP
pushNonFFMatching
.RS 4
Advice shown when you ran
\fBgit-push\fR(1)
and pushed
\fImatching refs\fR
explicitly (i\&.e\&. you used
\fI:\fR, or specified a refspec that isn\(cqt your current branch) and it resulted in a non\-fast\-forward error\&.
.RE
.PP
pushAlreadyExists
.RS 4
Shown when
\fBgit-push\fR(1)
rejects an update that does not qualify for fast\-forwarding (e\&.g\&., a tag\&.)
.RE
.PP
pushFetchFirst
.RS 4
Shown when
\fBgit-push\fR(1)
rejects an update that tries to overwrite a remote ref that points at an object we do not have\&.
.RE
.PP
pushNeedsForce
.RS 4
Shown when
\fBgit-push\fR(1)
rejects an update that tries to overwrite a remote ref that points at an object that is not a commit\-ish, or make the remote ref point at an object that is not a commit\-ish\&.
.RE
.PP
statusHints
.RS 4
Show directions on how to proceed from the current state in the output of
\fBgit-status\fR(1), in the template shown when writing commit messages in
\fBgit-commit\fR(1), and in the help message shown by
\fBgit-checkout\fR(1)
when switching branch\&.
.RE
.PP
statusUoption
.RS 4
Advise to consider using the
\fB\-u\fR
option to
\fBgit-status\fR(1)
when the command takes more than 2 seconds to enumerate untracked files\&.
.RE
.PP
commitBeforeMerge
.RS 4
Advice shown when
\fBgit-merge\fR(1)
refuses to merge to avoid overwriting local changes\&.
.RE
.PP
resetQuiet
.RS 4
Advice to consider using the
\fB\-\-quiet\fR
option to
\fBgit-reset\fR(1)
when the command takes more than 2 seconds to enumerate unstaged changes after reset\&.
.RE
.PP
resolveConflict
.RS 4
Advice shown by various commands when conflicts prevent the operation from being performed\&.
.RE
.PP
implicitIdentity
.RS 4
Advice on how to set your identity configuration when your information is guessed from the system username and domain name\&.
.RE
.PP
detachedHead
.RS 4
Advice shown when you used
\fBgit-checkout\fR(1)
to move to the detach HEAD state, to instruct how to create a local branch after the fact\&.
.RE
.PP
checkoutAmbiguousRemoteBranchName
.RS 4
Advice shown when the argument to
\fBgit-checkout\fR(1)
ambiguously resolves to a remote tracking branch on more than one remote in situations where an unambiguous argument would have otherwise caused a remote\-tracking branch to be checked out\&. See the
\fBcheckout\&.defaultRemote\fR
configuration variable for how to set a given remote to used by default in some situations where this advice would be printed\&.
.RE
.PP
amWorkDir
.RS 4
Advice that shows the location of the patch file when
\fBgit-am\fR(1)
fails to apply it\&.
.RE
.PP
rmHints
.RS 4
In case of failure in the output of
\fBgit-rm\fR(1), show directions on how to proceed from the current state\&.
.RE
.PP
addEmbeddedRepo
.RS 4
Advice on what to do when you\(cqve accidentally added one git repo inside of another\&.
.RE
.PP
ignoredHook
.RS 4
Advice shown if a hook is ignored because the hook is not set as executable\&.
.RE
.PP
waitingForEditor
.RS 4
Print a message to the terminal whenever Git is waiting for editor input from the user\&.
.RE
.RE
.PP
core\&.fileMode
.RS 4
Tells Git if the executable bit of files in the working tree is to be honored\&.
.sp
Some filesystems lose the executable bit when a file that is marked as executable is checked out, or checks out a non\-executable file with executable bit on\&.
\fBgit-clone\fR(1)
or
\fBgit-init\fR(1)
probe the filesystem to see if it handles the executable bit correctly and this variable is automatically set as necessary\&.
.sp
A repository, however, may be on a filesystem that handles the filemode correctly, and this variable is set to
\fItrue\fR
when created, but later may be made accessible from another environment that loses the filemode (e\&.g\&. exporting ext4 via CIFS mount, visiting a Cygwin created repository with Git for Windows or Eclipse)\&. In such a case it may be necessary to set this variable to
\fIfalse\fR\&. See
\fBgit-update-index\fR(1)\&.
.sp
The default is true (when core\&.filemode is not specified in the config file)\&.
.RE
.PP
core\&.hideDotFiles
.RS 4
(Windows\-only) If true, mark newly\-created directories and files whose name starts with a dot as hidden\&. If
\fIdotGitOnly\fR, only the
\fB\&.git/\fR
directory is hidden, but no other files starting with a dot\&. The default mode is
\fIdotGitOnly\fR\&.
.RE
.PP
core\&.ignoreCase
.RS 4
Internal variable which enables various workarounds to enable Git to work better on filesystems that are not case sensitive, like APFS, HFS+, FAT, NTFS, etc\&. For example, if a directory listing finds "makefile" when Git expects "Makefile", Git will assume it is really the same file, and continue to remember it as "Makefile"\&.
.sp
The default is false, except
\fBgit-clone\fR(1)
or
\fBgit-init\fR(1)
will probe and set core\&.ignoreCase true if appropriate when the repository is created\&.
.sp
Git relies on the proper configuration of this variable for your operating and file system\&. Modifying this value may result in unexpected behavior\&.
.RE
.PP
core\&.precomposeUnicode
.RS 4
This option is only used by Mac OS implementation of Git\&. When core\&.precomposeUnicode=true, Git reverts the unicode decomposition of filenames done by Mac OS\&. This is useful when sharing a repository between Mac OS and Linux or Windows\&. (Git for Windows 1\&.7\&.10 or higher is needed, or Git under cygwin 1\&.7)\&. When false, file names are handled fully transparent by Git, which is backward compatible with older versions of Git\&.
.RE
.PP
core\&.protectHFS
.RS 4
If set to true, do not allow checkout of paths that would be considered equivalent to
\fB\&.git\fR
on an HFS+ filesystem\&. Defaults to
\fBtrue\fR
on Mac OS, and
\fBfalse\fR
elsewhere\&.
.RE
.PP
core\&.protectNTFS
.RS 4
If set to true, do not allow checkout of paths that would cause problems with the NTFS filesystem, e\&.g\&. conflict with 8\&.3 "short" names\&. Defaults to
\fBtrue\fR
on Windows, and
\fBfalse\fR
elsewhere\&.
.RE
.PP
core\&.fsmonitor
.RS 4
If set, the value of this variable is used as a command which will identify all files that may have changed since the requested date/time\&. This information is used to speed up git by avoiding unnecessary processing of files that have not changed\&. See the "fsmonitor\-watchman" section of
\fBgithooks\fR(5)\&.
.RE
.PP
core\&.trustctime
.RS 4
If false, the ctime differences between the index and the 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
\fBgit-update-index\fR(1)\&. True by default\&.
.RE
.PP
core\&.splitIndex
.RS 4
If true, the split\-index feature of the index will be used\&. See
\fBgit-update-index\fR(1)\&. False by default\&.
.RE
.PP
core\&.untrackedCache
.RS 4
Determines what to do about the untracked cache feature of the index\&. It will be kept, if this variable is unset or set to
\fBkeep\fR\&. It will automatically be added if set to
\fBtrue\fR\&. And it will automatically be removed, if set to
\fBfalse\fR\&. Before setting it to
\fBtrue\fR, you should check that mtime is working properly on your system\&. See
\fBgit-update-index\fR(1)\&.
\fBkeep\fR
by default\&.
.RE
.PP
core\&.checkStat
.RS 4
When missing or is set to
\fBdefault\fR, many fields in the stat structure are checked to detect if a file has been modified since Git looked at it\&. When this configuration variable is set to
\fBminimal\fR, sub\-second part of mtime and ctime, the uid and gid of the owner of the file, the inode number (and the device number, if Git was compiled to use it), are excluded from the check among these fields, leaving only the whole\-second part of mtime (and ctime, if
\fBcore\&.trustCtime\fR
is set) and the filesize to be checked\&.
.sp
There are implementations of Git that do not leave usable values in some fields (e\&.g\&. JGit); by excluding these fields from the comparison, the
\fBminimal\fR
mode may help interoperability when the same repository is used by these other systems at the same time\&.
.RE
.PP
core\&.quotePath
.RS 4
Commands that output paths (e\&.g\&.
\fIls\-files\fR,
\fIdiff\fR), will quote "unusual" characters in the pathname by enclosing the pathname in double\-quotes and escaping those characters with backslashes in the same way C escapes control characters (e\&.g\&.
\fB\et\fR
for TAB,
\fB\en\fR
for LF,
\fB\e\e\fR
for backslash) or bytes with values larger than 0x80 (e\&.g\&. octal
\fB\e302\e265\fR
for "micro" in UTF\-8)\&. If this variable is set to false, bytes higher than 0x80 are not considered "unusual" any more\&. Double\-quotes, backslash and control characters are always escaped regardless of the setting of this variable\&. A simple space character is not considered "unusual"\&. Many commands can output pathnames completely verbatim using the
\fB\-z\fR
option\&. The default value is true\&.
.RE
.PP
core\&.eol
.RS 4
Sets the line ending type to use in the working directory for files that have the
\fBtext\fR
property set when core\&.autocrlf is false\&. Alternatives are
\fIlf\fR,
\fIcrlf\fR
and
\fInative\fR, which uses the platform\(cqs native line ending\&. The default value is
\fBnative\fR\&. See
\fBgitattributes\fR(5)
for more information on end\-of\-line conversion\&.
.RE
.PP
core\&.safecrlf
.RS 4
If true, makes Git check if converting
\fBCRLF\fR
is reversible when end\-of\-line conversion is active\&. Git will verify if a command modifies a file in the work tree either directly or indirectly\&. For example, committing a file followed by checking out the same file should yield the original file in the work tree\&. If this is not the case for the current setting of
\fBcore\&.autocrlf\fR, Git will reject the file\&. The variable can be set to "warn", in which case Git will only warn about an irreversible conversion but continue the operation\&.
.sp
CRLF conversion bears a slight chance of corrupting data\&. When it is enabled, Git will convert CRLF to LF during commit and LF to CRLF during checkout\&. A file that contains a mixture of LF and CRLF before the commit cannot be recreated by Git\&. For text files this is the right thing to do: it corrects line endings such that we have only LF line endings in the repository\&. But for binary files that are accidentally classified as text the conversion can corrupt data\&.
.sp
If you recognize such corruption early you can easily fix it by setting the conversion type explicitly in \&.gitattributes\&. Right after committing you still have the original file in your work tree and this file is not yet corrupted\&. You can explicitly tell Git that this file is binary and Git will handle the file appropriately\&.
.sp
Unfortunately, the desired effect of cleaning up text files with mixed line endings and the undesired effect of corrupting binary files cannot be distinguished\&. In both cases CRLFs are removed in an irreversible way\&. For text files this is the right thing to do because CRLFs are line endings, while for binary files converting CRLFs corrupts data\&.
.sp
Note, this safety check does not mean that a checkout will generate a file identical to the original file for a different setting of
\fBcore\&.eol\fR
and
\fBcore\&.autocrlf\fR, but only for the current one\&. For example, a text file with
\fBLF\fR
would be accepted with
\fBcore\&.eol=lf\fR
and could later be checked out with
\fBcore\&.eol=crlf\fR, in which case the resulting file would contain
\fBCRLF\fR, although the original file contained
\fBLF\fR\&. However, in both work trees the line endings would be consistent, that is either all
\fBLF\fR
or all
\fBCRLF\fR, but never mixed\&. A file with mixed line endings would be reported by the
\fBcore\&.safecrlf\fR
mechanism\&.
.RE
.PP
core\&.autocrlf
.RS 4
Setting this variable to "true" is the same as setting the
\fBtext\fR
attribute to "auto" on all files and core\&.eol to "crlf"\&. Set to true if you want to have
\fBCRLF\fR
line endings in your working directory and the repository has LF line endings\&. This variable can be set to
\fIinput\fR, in which case no output conversion is performed\&.
.RE
.PP
core\&.checkRoundtripEncoding
.RS 4
A comma and/or whitespace separated list of encodings that Git performs UTF\-8 round trip checks on if they are used in an
\fBworking\-tree\-encoding\fR
attribute (see
\fBgitattributes\fR(5))\&. The default value is
\fBSHIFT\-JIS\fR\&.
.RE
.PP
core\&.symlinks
.RS 4
If false, symbolic links are checked out as small plain files that contain the link text\&.
\fBgit-update-index\fR(1)
and
\fBgit-add\fR(1)
will not change the recorded type to regular file\&. Useful on filesystems like FAT that do not support symbolic links\&.
.sp
The default is true, except
\fBgit-clone\fR(1)
or
\fBgit-init\fR(1)
will probe and set core\&.symlinks false if appropriate when the repository is created\&.
.RE
.PP
core\&.gitProxy
.RS 4
A "proxy command" to execute (as
\fIcommand host port\fR) instead of establishing direct connection to the remote server when using the Git protocol for fetching\&. If the variable value is in the "COMMAND for DOMAIN" format, the command is applied only on hostnames ending with the specified domain string\&. This variable may be set multiple times and is matched in the given order; the first match wins\&.
.sp
Can be overridden by the
\fBGIT_PROXY_COMMAND\fR
environment variable (which always applies universally, without the special "for" handling)\&.
.sp
The special string
\fBnone\fR
can be used as the proxy command to specify that no proxy be used for a given domain pattern\&. This is useful for excluding servers inside a firewall from proxy use, while defaulting to a common proxy for external domains\&.
.RE
.PP
core\&.sshCommand
.RS 4
If this variable is set,
\fBgit fetch\fR
and
\fBgit push\fR
will use the specified command instead of
\fBssh\fR
when they need to connect to a remote system\&. The command is in the same form as the
\fBGIT_SSH_COMMAND\fR
environment variable and is overridden when the environment variable is set\&.
.RE
.PP
core\&.ignoreStat
.RS 4
If true, Git will avoid using lstat() calls to detect if files have changed by setting the "assume\-unchanged" bit for those tracked files which it has updated identically in both the index and working tree\&.
.sp
When files are modified outside of Git, the user will need to stage the modified files explicitly (e\&.g\&. see
\fIExamples\fR
section in
\fBgit-update-index\fR(1))\&. Git will not normally detect changes to those files\&.
.sp
This is useful on systems where lstat() calls are very slow, such as CIFS/Microsoft Windows\&.
.sp
False by default\&.
.RE
.PP
core\&.preferSymlinkRefs
.RS 4
Instead of the default "symref" format for HEAD and other symbolic reference files, use symbolic links\&. This is sometimes needed to work with old scripts that expect HEAD to be a symbolic link\&.
.RE
.PP
core\&.alternateRefsCommand
.RS 4
When advertising tips of available history from an alternate, use the shell to execute the specified command instead of
\fBgit-for-each-ref\fR(1)\&. The first argument is the absolute path of the alternate\&. Output must contain one hex object id per line (i\&.e\&., the same as produced by
\fBgit for\-each\-ref \-\-format=\(aq%(objectname)\(aq\fR)\&.
.sp
Note that you cannot generally put
\fBgit for\-each\-ref\fR
directly into the config value, as it does not take a repository path as an argument (but you can wrap the command above in a shell script)\&.
.RE
.PP
core\&.alternateRefsPrefixes
.RS 4
When listing references from an alternate, list only references that begin with the given prefix\&. Prefixes match as if they were given as arguments to
\fBgit-for-each-ref\fR(1)\&. To list multiple prefixes, separate them with whitespace\&. If
\fBcore\&.alternateRefsCommand\fR
is set, setting
\fBcore\&.alternateRefsPrefixes\fR
has no effect\&.
.RE
.PP
core\&.bare
.RS 4
If true this repository is assumed to be
\fIbare\fR
and has no working directory associated with it\&. If this is the case a number of commands that require a working directory will be disabled, such as
\fBgit-add\fR(1)
or
\fBgit-merge\fR(1)\&.
.sp
This setting is automatically guessed by
\fBgit-clone\fR(1)
or
\fBgit-init\fR(1)
when the repository was created\&. By default a repository that ends in "/\&.git" is assumed to be not bare (bare = false), while all other repositories are assumed to be bare (bare = true)\&.
.RE
.PP
core\&.worktree
.RS 4
Set the path to the root of the working tree\&. If
\fBGIT_COMMON_DIR\fR
environment variable is set, core\&.worktree is ignored and not used for determining the root of working tree\&. This can be overridden by the
\fBGIT_WORK_TREE\fR
environment variable and the
\fB\-\-work\-tree\fR
command\-line option\&. 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 \-\-work\-tree, GIT_WORK_TREE and core\&.worktree is specified, the current working directory is regarded as the top level of your working tree\&.
.sp
Note that this variable is honored even when set in a configuration file in a "\&.git" subdirectory of a directory and its value differs from the latter directory (e\&.g\&. "/path/to/\&.git/config" has core\&.worktree set to "/different/path"), which is most likely a misconfiguration\&. Running Git commands in the "/path/to" directory will still use "/different/path" as the root of the work tree and can cause confusion unless you know what you are doing (e\&.g\&. you are creating a read\-only snapshot of the same index to a location different from the repository\(cqs usual working tree)\&.
.RE
.PP
core\&.logAllRefUpdates
.RS 4
Enable the reflog\&. Updates to a ref <ref> is logged to the file "\fB$GIT_DIR/logs/<ref>\fR", by appending the new and old SHA\-1, the date/time and the reason of the update, but only when the file exists\&. If this configuration variable is set to
\fBtrue\fR, missing "\fB$GIT_DIR/logs/<ref>\fR" file is automatically created for branch heads (i\&.e\&. under
\fBrefs/heads/\fR), remote refs (i\&.e\&. under
\fBrefs/remotes/\fR), note refs (i\&.e\&. under
\fBrefs/notes/\fR), and the symbolic ref
\fBHEAD\fR\&. If it is set to
\fBalways\fR, then a missing reflog is automatically created for any ref under
\fBrefs/\fR\&.
.sp
This information can be used to determine what commit was the tip of a branch "2 days ago"\&.
.sp
This value is true by default in a repository that has a working directory associated with it, and false by default in a bare repository\&.
.RE
.PP
core\&.repositoryFormatVersion
.RS 4
Internal variable identifying the repository format and layout version\&.
.RE
.PP
core\&.sharedRepository
.RS 4
When
\fIgroup\fR
(or
\fItrue\fR), the repository is made shareable between several users in a group (making sure all the files and objects are group\-writable)\&. When
\fIall\fR
(or
\fIworld\fR
or
\fIeverybody\fR), the repository will be readable by all users, additionally to being group\-shareable\&. When
\fIumask\fR
(or
\fIfalse\fR), Git will use permissions reported by umask(2)\&. When
\fI0xxx\fR, where
\fI0xxx\fR
is an octal number, files in the repository will have this mode value\&.
\fI0xxx\fR
will override user\(cqs umask value (whereas the other options will only override requested parts of the user\(cqs umask value)\&. Examples:
\fI0660\fR
will make the repo read/write\-able for the owner and group, but inaccessible to others (equivalent to
\fIgroup\fR
unless umask is e\&.g\&.
\fI0022\fR)\&.
\fI0640\fR
is a repository that is group\-readable but not group\-writable\&. See
\fBgit-init\fR(1)\&. False by default\&.
.RE
.PP
core\&.warnAmbiguousRefs
.RS 4
If true, Git will warn you if the ref name you passed it is ambiguous and might match multiple refs in the repository\&. True by default\&.
.RE
.PP
core\&.compression
.RS 4
An integer \-1\&.\&.9, indicating a default compression level\&. \-1 is the zlib default\&. 0 means no compression, and 1\&.\&.9 are various speed/size tradeoffs, 9 being slowest\&. If set, this provides a default to other compression variables, such as
\fBcore\&.looseCompression\fR
and
\fBpack\&.compression\fR\&.
.RE
.PP
core\&.looseCompression
.RS 4
An integer \-1\&.\&.9, indicating the compression level for objects that are not in a pack file\&. \-1 is the zlib default\&. 0 means no compression, and 1\&.\&.9 are various speed/size tradeoffs, 9 being slowest\&. If not set, defaults to core\&.compression\&. If that is not set, defaults to 1 (best speed)\&.
.RE
.PP
core\&.packedGitWindowSize
.RS 4
Number of bytes of a pack file to map into memory in a single mapping operation\&. Larger window sizes may allow your system to process a smaller number of large pack files more quickly\&. Smaller window sizes will negatively affect performance due to increased calls to the operating system\(cqs memory manager, but may improve performance when accessing a large number of large pack files\&.
.sp
Default is 1 MiB if NO_MMAP was set at compile time, otherwise 32 MiB on 32 bit platforms and 1 GiB on 64 bit platforms\&. This should be reasonable for all users/operating systems\&. You probably do not need to adjust this value\&.
.sp
Common unit suffixes of
\fIk\fR,
\fIm\fR, or
\fIg\fR
are supported\&.
.RE
.PP
core\&.packedGitLimit
.RS 4
Maximum number of bytes to map simultaneously into memory from pack files\&. If Git needs to access more than this many bytes at once to complete an operation it will unmap existing regions to reclaim virtual address space within the process\&.
.sp
Default is 256 MiB on 32 bit platforms and 32 TiB (effectively unlimited) on 64 bit platforms\&. This should be reasonable for all users/operating systems, except on the largest projects\&. You probably do not need to adjust this value\&.
.sp
Common unit suffixes of
\fIk\fR,
\fIm\fR, or
\fIg\fR
are supported\&.
.RE
.PP
core\&.deltaBaseCacheLimit
.RS 4
Maximum number of bytes to reserve for caching base objects that may be referenced by multiple deltified objects\&. By storing the entire decompressed base objects in a cache Git is able to avoid unpacking and decompressing frequently used base objects multiple times\&.
.sp
Default is 96 MiB on all platforms\&. This should be reasonable for all users/operating systems, except on the largest projects\&. You probably do not need to adjust this value\&.
.sp
Common unit suffixes of
\fIk\fR,
\fIm\fR, or
\fIg\fR
are supported\&.
.RE
.PP
core\&.bigFileThreshold
.RS 4
Files larger than this size are stored deflated, without attempting delta compression\&. Storing large files without delta compression avoids excessive memory usage, at the slight expense of increased disk usage\&. Additionally files larger than this size are always treated as binary\&.
.sp
Default is 512 MiB on all platforms\&. This should be reasonable for most projects as source code and other text files can still be delta compressed, but larger binary media files won\(cqt be\&.
.sp
Common unit suffixes of
\fIk\fR,
\fIm\fR, or
\fIg\fR
are supported\&.
.RE
.PP
core\&.excludesFile
.RS 4
Specifies the pathname to the file that contains patterns to describe paths that are not meant to be tracked, in addition to
\fI\&.gitignore\fR
(per\-directory) and
\fI\&.git/info/exclude\fR\&. Defaults to
\fB$XDG_CONFIG_HOME/git/ignore\fR\&. If
\fB$XDG_CONFIG_HOME\fR
is either not set or empty,
\fB$HOME/\&.config/git/ignore\fR
is used instead\&. See
\fBgitignore\fR(5)\&.
.RE
.PP
core\&.askPass
.RS 4
Some commands (e\&.g\&. svn and http interfaces) that interactively ask for a password can be told to use an external program given via the value of this variable\&. Can be overridden by the
\fBGIT_ASKPASS\fR
environment variable\&. If not set, fall back to the value of the
\fBSSH_ASKPASS\fR
environment variable or, failing that, a simple password prompt\&. The external program shall be given a suitable prompt as command\-line argument and write the password on its STDOUT\&.
.RE
.PP
core\&.attributesFile
.RS 4
In addition to
\fI\&.gitattributes\fR
(per\-directory) and
\fI\&.git/info/attributes\fR, Git looks into this file for attributes (see
\fBgitattributes\fR(5))\&. Path expansions are made the same way as for
\fBcore\&.excludesFile\fR\&. Its default value is
\fB$XDG_CONFIG_HOME/git/attributes\fR\&. If
\fB$XDG_CONFIG_HOME\fR
is either not set or empty,
\fB$HOME/\&.config/git/attributes\fR
is used instead\&.
.RE
.PP
core\&.hooksPath
.RS 4
By default Git will look for your hooks in the
\fI$GIT_DIR/hooks\fR
directory\&. Set this to different path, e\&.g\&.
\fI/etc/git/hooks\fR, and Git will try to find your hooks in that directory, e\&.g\&.
\fI/etc/git/hooks/pre\-receive\fR
instead of in
\fI$GIT_DIR/hooks/pre\-receive\fR\&.
.sp
The path can be either absolute or relative\&. A relative path is taken as relative to the directory where the hooks are run (see the "DESCRIPTION" section of
\fBgithooks\fR(5))\&.
.sp
This configuration variable is useful in cases where you\(cqd like to centrally configure your Git hooks instead of configuring them on a per\-repository basis, or as a more flexible and centralized alternative to having an
\fBinit\&.templateDir\fR
where you\(cqve changed default hooks\&.
.RE
.PP
core\&.editor
.RS 4
Commands such as
\fBcommit\fR
and
\fBtag\fR
that let you edit messages by launching an editor use the value of this variable when it is set, and the environment variable
\fBGIT_EDITOR\fR
is not set\&. See
\fBgit-var\fR(1)\&.
.RE
.PP
core\&.commentChar
.RS 4
Commands such as
\fBcommit\fR
and
\fBtag\fR
that let you edit messages consider a line that begins with this character commented, and removes them after the editor returns (default
\fI#\fR)\&.
.sp
If set to "auto",
\fBgit\-commit\fR
would select a character that is not the beginning character of any line in existing commit messages\&.
.RE
.PP
core\&.filesRefLockTimeout
.RS 4
The length of time, in milliseconds, to retry when trying to lock an individual reference\&. Value 0 means not to retry at all; \-1 means to try indefinitely\&. Default is 100 (i\&.e\&., retry for 100ms)\&.
.RE
.PP
core\&.packedRefsTimeout
.RS 4
The length of time, in milliseconds, to retry when trying to lock the
\fBpacked\-refs\fR
file\&. Value 0 means not to retry at all; \-1 means to try indefinitely\&. Default is 1000 (i\&.e\&., retry for 1 second)\&.
.RE
.PP
core\&.pager
.RS 4
Text viewer for use by Git commands (e\&.g\&.,
\fIless\fR)\&. The value is meant to be interpreted by the shell\&. The order of preference is the
\fB$GIT_PAGER\fR
environment variable, then
\fBcore\&.pager\fR
configuration, then
\fB$PAGER\fR, and then the default chosen at compile time (usually
\fIless\fR)\&.
.sp
When the
\fBLESS\fR
environment variable is unset, Git sets it to
\fBFRX\fR
(if
\fBLESS\fR
environment variable is set, Git does not change it at all)\&. If you want to selectively override Git\(cqs default setting for
\fBLESS\fR, you can set
\fBcore\&.pager\fR
to e\&.g\&.
\fBless \-S\fR\&. This will be passed to the shell by Git, which will translate the final command to
\fBLESS=FRX less \-S\fR\&. The environment does not set the
\fBS\fR
option but the command line does, instructing less to truncate long lines\&. Similarly, setting
\fBcore\&.pager\fR
to
\fBless \-+F\fR
will deactivate the
\fBF\fR
option specified by the environment from the command\-line, deactivating the "quit if one screen" behavior of
\fBless\fR\&. One can specifically activate some flags for particular commands: for example, setting
\fBpager\&.blame\fR
to
\fBless \-S\fR
enables line truncation only for
\fBgit blame\fR\&.
.sp
Likewise, when the
\fBLV\fR
environment variable is unset, Git sets it to
\fB\-c\fR\&. You can override this setting by exporting
\fBLV\fR
with another value or setting
\fBcore\&.pager\fR
to
\fBlv +c\fR\&.
.RE
.PP
core\&.whitespace
.RS 4
A comma separated list of common whitespace problems to notice\&.
\fIgit diff\fR
will use
\fBcolor\&.diff\&.whitespace\fR
to highlight them, and
\fIgit apply \-\-whitespace=error\fR
will consider them as errors\&. You can prefix
\fB\-\fR
to disable any of them (e\&.g\&.
\fB\-trailing\-space\fR):
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBblank\-at\-eol\fR
treats trailing whitespaces at the end of the line as an error (enabled by default)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBspace\-before\-tab\fR
treats a space character that appears immediately before a tab character in the initial indent part of the line as an error (enabled by default)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBindent\-with\-non\-tab\fR
treats a line that is indented with space characters instead of the equivalent tabs as an error (not enabled by default)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBtab\-in\-indent\fR
treats a tab character in the initial indent part of the line as an error (not enabled by default)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBblank\-at\-eof\fR
treats blank lines added at the end of file as an error (enabled by default)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBtrailing\-space\fR
is a short\-hand to cover both
\fBblank\-at\-eol\fR
and
\fBblank\-at\-eof\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBcr\-at\-eol\fR
treats a carriage\-return at the end of line as part of the line terminator, i\&.e\&. with it,
\fBtrailing\-space\fR
does not trigger if the character before such a carriage\-return is not a whitespace (not enabled by default)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBtabwidth=<n>\fR
tells how many character positions a tab occupies; this is relevant for
\fBindent\-with\-non\-tab\fR
and when Git fixes
\fBtab\-in\-indent\fR
errors\&. The default tab width is 8\&. Allowed values are 1 to 63\&.
.RE
.RE
.PP
core\&.fsyncObjectFiles
.RS 4
This boolean will enable
\fIfsync()\fR
when writing object files\&.
.sp
This is a total waste of time and effort on a filesystem that orders data writes properly, but can be useful for filesystems that do not use journalling (traditional UNIX filesystems) or that only journal metadata and not file contents (OS X\(cqs HFS+, or Linux ext3 with "data=writeback")\&.
.RE
.PP
core\&.preloadIndex
.RS 4
Enable parallel index preload for operations like
\fIgit diff\fR
.sp
This can speed up operations like
\fIgit diff\fR
and
\fIgit status\fR
especially on filesystems like NFS that have weak caching semantics and thus relatively high IO latencies\&. When enabled, Git will do the index comparison to the filesystem data in parallel, allowing overlapping IO\(cqs\&. Defaults to true\&.
.RE
.PP
core\&.unsetenvvars
.RS 4
Windows\-only: comma\-separated list of environment variables\(aq names that need to be unset before spawning any other process\&. Defaults to
\fBPERL5LIB\fR
to account for the fact that Git for Windows insists on using its own Perl interpreter\&.
.RE
.PP
core\&.createObject
.RS 4
You can set this to
\fIlink\fR, in which case a hardlink followed by a delete of the source are used to make sure that object creation will not overwrite existing objects\&.
.sp
On some file system/operating system combinations, this is unreliable\&. Set this config setting to
\fIrename\fR
there; However, This will remove the check that makes sure that existing object files will not get overwritten\&.
.RE
.PP
core\&.notesRef
.RS 4
When showing commit messages, also show notes which are stored in the given ref\&. The ref must be fully qualified\&. If the given ref does not exist, it is not an error but means that no notes should be printed\&.
.sp
This setting defaults to "refs/notes/commits", and it can be overridden by the
\fBGIT_NOTES_REF\fR
environment variable\&. See
\fBgit-notes\fR(1)\&.
.RE
.PP
core\&.commitGraph
.RS 4
If true, then git will read the commit\-graph file (if it exists) to parse the graph structure of commits\&. Defaults to false\&. See
\fBgit-commit-graph\fR(1)
for more information\&.
.RE
.PP
core\&.useReplaceRefs
.RS 4
If set to
\fBfalse\fR, behave as if the
\fB\-\-no\-replace\-objects\fR
option was given on the command line\&. See
\fBgit\fR(1)
and
\fBgit-replace\fR(1)
for more information\&.
.RE
.PP
core\&.multiPackIndex
.RS 4
Use the multi\-pack\-index file to track multiple packfiles using a single index\&. See
\m[blue]\fBthe multi\-pack\-index design document\fR\m[]\&\s-2\u[1]\d\s+2\&.
.RE
.PP
core\&.sparseCheckout
.RS 4
Enable "sparse checkout" feature\&. See section "Sparse checkout" in
\fBgit-read-tree\fR(1)
for more information\&.
.RE
.PP
core\&.abbrev
.RS 4
Set the length object names are abbreviated to\&. If unspecified or set to "auto", an appropriate value is computed based on the approximate number of packed objects in your repository, which hopefully is enough for abbreviated object names to stay unique for some time\&. The minimum length is 4\&.
.RE
.PP
add\&.ignoreErrors, add\&.ignore\-errors (deprecated)
.RS 4
Tells
\fIgit add\fR
to continue adding files when some files cannot be added due to indexing errors\&. Equivalent to the
\fB\-\-ignore\-errors\fR
option of
\fBgit-add\fR(1)\&.
\fBadd\&.ignore\-errors\fR
is deprecated, as it does not follow the usual naming convention for configuration variables\&.
.RE
.PP
alias\&.*
.RS 4
Command aliases for the
\fBgit\fR(1)
command wrapper \- e\&.g\&. after defining "alias\&.last = cat\-file commit HEAD", the invocation "git last" is equivalent to "git cat\-file commit HEAD"\&. To avoid confusion and troubles with script usage, aliases that hide existing Git commands are ignored\&. Arguments are split by spaces, the usual shell quoting and escaping is supported\&. A quote pair or a backslash can be used to quote them\&.
.sp
If the alias expansion is prefixed with an exclamation point, it will be treated as a shell command\&. For example, defining "alias\&.new = !gitk \-\-all \-\-not ORIG_HEAD", the invocation "git new" is equivalent to running the shell command "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\&.
\fBGIT_PREFIX\fR
is set as returned by running
\fIgit rev\-parse \-\-show\-prefix\fR
from the original current directory\&. See
\fBgit-rev-parse\fR(1)\&.
.RE
.PP
am\&.keepcr
.RS 4
If true, git\-am will call git\-mailsplit for patches in mbox format with parameter
\fB\-\-keep\-cr\fR\&. In this case git\-mailsplit will not remove
\fB\er\fR
from lines ending with
\fB\er\en\fR\&. Can be overridden by giving
\fB\-\-no\-keep\-cr\fR
from the command line\&. See
\fBgit-am\fR(1),
\fBgit-mailsplit\fR(1)\&.
.RE
.PP
am\&.threeWay
.RS 4
By default,
\fBgit am\fR
will fail if the patch does not apply cleanly\&. When set to true, this setting tells
\fBgit am\fR
to fall back on 3\-way merge if the patch records the identity of blobs it is supposed to apply to and we have those blobs available locally (equivalent to giving the
\fB\-\-3way\fR
option from the command line)\&. Defaults to
\fBfalse\fR\&. See
\fBgit-am\fR(1)\&.
.RE
.PP
apply\&.ignoreWhitespace
.RS 4
When set to
\fIchange\fR, tells
\fIgit apply\fR
to ignore changes in whitespace, in the same way as the
\fB\-\-ignore\-space\-change\fR
option\&. When set to one of: no, none, never, false tells
\fIgit apply\fR
to respect all whitespace differences\&. See
\fBgit-apply\fR(1)\&.
.RE
.PP
apply\&.whitespace
.RS 4
Tells
\fIgit apply\fR
how to handle whitespaces, in the same way as the
\fB\-\-whitespace\fR
option\&. See
\fBgit-apply\fR(1)\&.
.RE
.PP
blame\&.blankBoundary
.RS 4
Show blank commit object name for boundary commits in
\fBgit-blame\fR(1)\&. This option defaults to false\&.
.RE
.PP
blame\&.coloring
.RS 4
This determines the coloring scheme to be applied to blame output\&. It can be
\fIrepeatedLines\fR,
\fIhighlightRecent\fR, or
\fInone\fR
which is the default\&.
.RE
.PP
blame\&.date
.RS 4
Specifies the format used to output dates in
\fBgit-blame\fR(1)\&. If unset the iso format is used\&. For supported values, see the discussion of the
\fB\-\-date\fR
option at
\fBgit-log\fR(1)\&.
.RE
.PP
blame\&.showEmail
.RS 4
Show the author email instead of author name in
\fBgit-blame\fR(1)\&. This option defaults to false\&.
.RE
.PP
blame\&.showRoot
.RS 4
Do not treat root commits as boundaries in
\fBgit-blame\fR(1)\&. This option defaults to false\&.
.RE
.PP
branch\&.autoSetupMerge
.RS 4
Tells
\fIgit branch\fR
and
\fIgit checkout\fR
to set up new branches so that
\fBgit-pull\fR(1)
will appropriately merge from the starting point branch\&. Note that even if this option is not set, this behavior can be chosen per\-branch using the
\fB\-\-track\fR
and
\fB\-\-no\-track\fR
options\&. The valid settings are:
\fBfalse\fR \(em no automatic setup is done;
\fBtrue\fR \(em automatic setup is done when the starting point is a remote\-tracking branch;
\fBalways\fR \(em automatic setup is done when the starting point is either a local branch or remote\-tracking branch\&. This option defaults to true\&.
.RE
.PP
branch\&.autoSetupRebase
.RS 4
When a new branch is created with
\fIgit branch\fR
or
\fIgit checkout\fR
that tracks another branch, this variable tells Git to set up pull to rebase instead of merge (see "branch\&.<name>\&.rebase")\&. When
\fBnever\fR, rebase is never automatically set to true\&. When
\fBlocal\fR, rebase is set to true for tracked branches of other local branches\&. When
\fBremote\fR, rebase is set to true for tracked branches of remote\-tracking branches\&. When
\fBalways\fR, rebase will be set to true for all tracking branches\&. See "branch\&.autoSetupMerge" for details on how to set up a branch to track another branch\&. This option defaults to never\&.
.RE
.PP
branch\&.sort
.RS 4
This variable controls the sort ordering of branches when displayed by
\fBgit-branch\fR(1)\&. Without the "\-\-sort=<value>" option provided, the value of this variable will be used as the default\&. See
\fBgit-for-each-ref\fR(1)
field names for valid values\&.
.RE
.PP
branch\&.<name>\&.remote
.RS 4
When on branch <name>, it tells
\fIgit fetch\fR
and
\fIgit push\fR
which remote to fetch from/push to\&. The remote to push to may be overridden with
\fBremote\&.pushDefault\fR
(for all branches)\&. The remote to push to, for the current branch, may be further overridden by
\fBbranch\&.<name>\&.pushRemote\fR\&. If no remote is configured, or if you are not on any branch, it defaults to
\fBorigin\fR
for fetching and
\fBremote\&.pushDefault\fR
for pushing\&. Additionally,
\fB\&.\fR
(a period) is the current local repository (a dot\-repository), see
\fBbranch\&.<name>\&.merge\fR\(aqs final note below\&.
.RE
.PP
branch\&.<name>\&.pushRemote
.RS 4
When on branch <name>, it overrides
\fBbranch\&.<name>\&.remote\fR
for pushing\&. It also overrides
\fBremote\&.pushDefault\fR
for pushing from branch <name>\&. When you pull from one place (e\&.g\&. your upstream) and push to another place (e\&.g\&. your own publishing repository), you would want to set
\fBremote\&.pushDefault\fR
to specify the remote to push to for all branches, and use this option to override it for a specific branch\&.
.RE
.PP
branch\&.<name>\&.merge
.RS 4
Defines, together with branch\&.<name>\&.remote, the upstream branch for the given branch\&. It tells
\fIgit fetch\fR/\fIgit pull\fR/\fIgit rebase\fR
which branch to merge and can also affect
\fIgit push\fR
(see push\&.default)\&. When in branch <name>, it tells
\fIgit fetch\fR
the default refspec to be marked for merging in FETCH_HEAD\&. The value is handled like the remote part of a refspec, and must match a ref which is fetched from the remote given by "branch\&.<name>\&.remote"\&. The merge information is used by
\fIgit pull\fR
(which at first calls
\fIgit fetch\fR) to lookup the default branch for merging\&. Without this option,
\fIgit pull\fR
defaults to merge the first refspec fetched\&. Specify multiple values to get an octopus merge\&. If you wish to setup
\fIgit pull\fR
so that it merges into <name> from another branch in the local repository, you can point branch\&.<name>\&.merge to the desired branch, and use the relative path setting
\fB\&.\fR
(a period) for branch\&.<name>\&.remote\&.
.RE
.PP
branch\&.<name>\&.mergeOptions
.RS 4
Sets default options for merging into branch <name>\&. The syntax and supported options are the same as those of
\fBgit-merge\fR(1), but option values containing whitespace characters are currently not supported\&.
.RE
.PP
branch\&.<name>\&.rebase
.RS 4
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\&. See "pull\&.rebase" for doing this in a non branch\-specific manner\&.
.sp
When
\fBmerges\fR, pass the
\fB\-\-rebase\-merges\fR
option to
\fIgit rebase\fR
so that the local merge commits are included in the rebase (see
\fBgit-rebase\fR(1)
for details)\&.
.sp
When preserve, also pass
\fB\-\-preserve\-merges\fR
along to
\fIgit rebase\fR
so that locally committed merge commits will not be flattened by running
\fIgit pull\fR\&.
.sp
When the value is
\fBinteractive\fR, the rebase is run in interactive mode\&.
.sp
\fBNOTE\fR: this is a possibly dangerous operation; do
\fBnot\fR
use it unless you understand the implications (see
\fBgit-rebase\fR(1)
for details)\&.
.RE
.PP
branch\&.<name>\&.description
.RS 4
Branch description, can be edited with
\fBgit branch \-\-edit\-description\fR\&. Branch description is automatically added in the format\-patch cover letter or request\-pull summary\&.
.RE
.PP
browser\&.<tool>\&.cmd
.RS 4
Specify the command to invoke the specified browser\&. The specified command is evaluated in shell with the URLs passed as arguments\&. (See
\fBgit-web--browse\fR(1)\&.)
.RE
.PP
browser\&.<tool>\&.path
.RS 4
Override the path for the given tool that may be used to browse HTML help (see
\fB\-w\fR
option in
\fBgit-help\fR(1)) or a working repository in gitweb (see
\fBgit-instaweb\fR(1))\&.
.RE
.PP
checkout\&.defaultRemote
.RS 4
When you run
\fIgit checkout <something>\fR
and only have one remote, it may implicitly fall back on checking out and tracking e\&.g\&.
\fIorigin/<something>\fR\&. This stops working as soon as you have more than one remote with a
\fI<something>\fR
reference\&. This setting allows for setting the name of a preferred remote that should always win when it comes to disambiguation\&. The typical use\-case is to set this to
\fBorigin\fR\&.
.sp
Currently this is used by
\fBgit-checkout\fR(1)
when
\fIgit checkout <something>\fR
will checkout the
\fI<something>\fR
branch on another remote, and by
\fBgit-worktree\fR(1)
when
\fIgit worktree add\fR
refers to a remote branch\&. This setting might be used for other checkout\-like commands or functionality in the future\&.
.RE
.PP
checkout\&.optimizeNewBranch
.RS 4
Optimizes the performance of "git checkout \-b <new_branch>" when using sparse\-checkout\&. When set to true, git will not update the repo based on the current sparse\-checkout settings\&. This means it will not update the skip\-worktree bit in the index nor add/remove files in the working directory to reflect the current sparse checkout settings nor will it show the local changes\&.
.RE
.PP
clean\&.requireForce
.RS 4
A boolean to make git\-clean do nothing unless given \-f, \-i or \-n\&. Defaults to true\&.
.RE
.PP
color\&.advice
.RS 4
A boolean to enable/disable color in hints (e\&.g\&. when a push failed, see
\fBadvice\&.*\fR
for a list)\&. May be set to
\fBalways\fR,
\fBfalse\fR
(or
\fBnever\fR) or
\fBauto\fR
(or
\fBtrue\fR), in which case colors are used only when the error output goes to a terminal\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.RE
.PP
color\&.advice\&.hint
.RS 4
Use customized color for hints\&.
.RE
.PP
color\&.blame\&.highlightRecent
.RS 4
This can be used to color the metadata of a blame line depending on age of the line\&.
.sp
This setting should be set to a comma\-separated list of color and date settings, starting and ending with a color, the dates should be set from oldest to newest\&. The metadata will be colored given the colors if the the line was introduced before the given timestamp, overwriting older timestamped colors\&.
.sp
Instead of an absolute timestamp relative timestamps work as well, e\&.g\&. 2\&.weeks\&.ago is valid to address anything older than 2 weeks\&.
.sp
It defaults to
\fIblue,12 month ago,white,1 month ago,red\fR, which colors everything older than one year blue, recent changes between one month and one year old are kept white, and lines introduced within the last month are colored red\&.
.RE
.PP
color\&.blame\&.repeatedLines
.RS 4
Use the customized color for the part of git\-blame output that is repeated meta information per line (such as commit id, author name, date and timezone)\&. Defaults to cyan\&.
.RE
.PP
color\&.branch
.RS 4
A boolean to enable/disable color in the output of
\fBgit-branch\fR(1)\&. May be set to
\fBalways\fR,
\fBfalse\fR
(or
\fBnever\fR) or
\fBauto\fR
(or
\fBtrue\fR), in which case colors are used only when the output is to a terminal\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.RE
.PP
color\&.branch\&.<slot>
.RS 4
Use customized color for branch coloration\&.
\fB<slot>\fR
is one of
\fBcurrent\fR
(the current branch),
\fBlocal\fR
(a local branch),
\fBremote\fR
(a remote\-tracking branch in refs/remotes/),
\fBupstream\fR
(upstream tracking branch),
\fBplain\fR
(other refs)\&.
.RE
.PP
color\&.diff
.RS 4
Whether to use ANSI escape sequences to add color to patches\&. If this is set to
\fBalways\fR,
\fBgit-diff\fR(1),
\fBgit-log\fR(1), and
\fBgit-show\fR(1)
will use color for all patches\&. If it is set to
\fBtrue\fR
or
\fBauto\fR, those commands will only use color when output is to the terminal\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.sp
This does not affect
\fBgit-format-patch\fR(1)
or the
\fIgit\-diff\-*\fR
plumbing commands\&. Can be overridden on the command line with the
\fB\-\-color[=<when>]\fR
option\&.
.RE
.PP
color\&.diff\&.<slot>
.RS 4
Use customized color for diff colorization\&.
\fB<slot>\fR
specifies which part of the patch to use the specified color, and is one of
\fBcontext\fR
(context text \-
\fBplain\fR
is a historical synonym),
\fBmeta\fR
(metainformation),
\fBfrag\fR
(hunk header),
\fIfunc\fR
(function in hunk header),
\fBold\fR
(removed lines),
\fBnew\fR
(added lines),
\fBcommit\fR
(commit headers),
\fBwhitespace\fR
(highlighting whitespace errors),
\fBoldMoved\fR
(deleted lines),
\fBnewMoved\fR
(added lines),
\fBoldMovedDimmed\fR,
\fBoldMovedAlternative\fR,
\fBoldMovedAlternativeDimmed\fR,
\fBnewMovedDimmed\fR,
\fBnewMovedAlternative\fR
\fBnewMovedAlternativeDimmed\fR
(See the
\fI<mode>\fR
setting of
\fI\-\-color\-moved\fR
in
\fBgit-diff\fR(1)
for details),
\fBcontextDimmed\fR,
\fBoldDimmed\fR,
\fBnewDimmed\fR,
\fBcontextBold\fR,
\fBoldBold\fR, and
\fBnewBold\fR
(see
\fBgit-range-diff\fR(1)
for details)\&.
.RE
.PP
color\&.decorate\&.<slot>
.RS 4
Use customized color for
\fIgit log \-\-decorate\fR
output\&.
\fB<slot>\fR
is one of
\fBbranch\fR,
\fBremoteBranch\fR,
\fBtag\fR,
\fBstash\fR
or
\fBHEAD\fR
for local branches, remote\-tracking branches, tags, stash and HEAD, respectively and
\fBgrafted\fR
for grafted commits\&.
.RE
.PP
color\&.grep
.RS 4
When set to
\fBalways\fR, always highlight matches\&. When
\fBfalse\fR
(or
\fBnever\fR), never\&. When set to
\fBtrue\fR
or
\fBauto\fR, use color only when the output is written to the terminal\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.RE
.PP
color\&.grep\&.<slot>
.RS 4
Use customized color for grep colorization\&.
\fB<slot>\fR
specifies which part of the line to use the specified color, and is one of
.PP
\fBcontext\fR
.RS 4
non\-matching text in context lines (when using
\fB\-A\fR,
\fB\-B\fR, or
\fB\-C\fR)
.RE
.PP
\fBfilename\fR
.RS 4
filename prefix (when not using
\fB\-h\fR)
.RE
.PP
\fBfunction\fR
.RS 4
function name lines (when using
\fB\-p\fR)
.RE
.PP
\fBlineNumber\fR
.RS 4
line number prefix (when using
\fB\-n\fR)
.RE
.PP
\fBcolumn\fR
.RS 4
column number prefix (when using
\fB\-\-column\fR)
.RE
.PP
\fBmatch\fR
.RS 4
matching text (same as setting
\fBmatchContext\fR
and
\fBmatchSelected\fR)
.RE
.PP
\fBmatchContext\fR
.RS 4
matching text in context lines
.RE
.PP
\fBmatchSelected\fR
.RS 4
matching text in selected lines
.RE
.PP
\fBselected\fR
.RS 4
non\-matching text in selected lines
.RE
.PP
\fBseparator\fR
.RS 4
separators between fields on a line (\fB:\fR,
\fB\-\fR, and
\fB=\fR) and between hunks (\fB\-\-\fR)
.RE
.RE
.PP
color\&.interactive
.RS 4
When set to
\fBalways\fR, always use colors for interactive prompts and displays (such as those used by "git\-add \-\-interactive" and "git\-clean \-\-interactive")\&. When false (or
\fBnever\fR), never\&. When set to
\fBtrue\fR
or
\fBauto\fR, use colors only when the output is to the terminal\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.RE
.PP
color\&.interactive\&.<slot>
.RS 4
Use customized color for
\fIgit add \-\-interactive\fR
and
\fIgit clean \-\-interactive\fR
output\&.
\fB<slot>\fR
may be
\fBprompt\fR,
\fBheader\fR,
\fBhelp\fR
or
\fBerror\fR, for four distinct types of normal output from interactive commands\&.
.RE
.PP
color\&.pager
.RS 4
A boolean to enable/disable colored output when the pager is in use (default is true)\&.
.RE
.PP
color\&.push
.RS 4
A boolean to enable/disable color in push errors\&. May be set to
\fBalways\fR,
\fBfalse\fR
(or
\fBnever\fR) or
\fBauto\fR
(or
\fBtrue\fR), in which case colors are used only when the error output goes to a terminal\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.RE
.PP
color\&.push\&.error
.RS 4
Use customized color for push errors\&.
.RE
.PP
color\&.remote
.RS 4
If set, keywords at the start of the line are highlighted\&. The keywords are "error", "warning", "hint" and "success", and are matched case\-insensitively\&. May be set to
\fBalways\fR,
\fBfalse\fR
(or
\fBnever\fR) or
\fBauto\fR
(or
\fBtrue\fR)\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.RE
.PP
color\&.remote\&.<slot>
.RS 4
Use customized color for each remote keyword\&.
\fB<slot>\fR
may be
\fBhint\fR,
\fBwarning\fR,
\fBsuccess\fR
or
\fBerror\fR
which match the corresponding keyword\&.
.RE
.PP
color\&.showBranch
.RS 4
A boolean to enable/disable color in the output of
\fBgit-show-branch\fR(1)\&. May be set to
\fBalways\fR,
\fBfalse\fR
(or
\fBnever\fR) or
\fBauto\fR
(or
\fBtrue\fR), in which case colors are used only when the output is to a terminal\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.RE
.PP
color\&.status
.RS 4
A boolean to enable/disable color in the output of
\fBgit-status\fR(1)\&. May be set to
\fBalways\fR,
\fBfalse\fR
(or
\fBnever\fR) or
\fBauto\fR
(or
\fBtrue\fR), in which case colors are used only when the output is to a terminal\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.RE
.PP
color\&.status\&.<slot>
.RS 4
Use customized color for status colorization\&.
\fB<slot>\fR
is one of
\fBheader\fR
(the header text of the status message),
\fBadded\fR
or
\fBupdated\fR
(files which are added but not committed),
\fBchanged\fR
(files which are changed but not added in the index),
\fBuntracked\fR
(files which are not tracked by Git),
\fBbranch\fR
(the current branch),
\fBnobranch\fR
(the color the
\fIno branch\fR
warning is shown in, defaulting to red),
\fBlocalBranch\fR
or
\fBremoteBranch\fR
(the local and remote branch names, respectively, when branch and tracking information is displayed in the status short\-format), or
\fBunmerged\fR
(files which have unmerged changes)\&.
.RE
.PP
color\&.transport
.RS 4
A boolean to enable/disable color when pushes are rejected\&. May be set to
\fBalways\fR,
\fBfalse\fR
(or
\fBnever\fR) or
\fBauto\fR
(or
\fBtrue\fR), in which case colors are used only when the error output goes to a terminal\&. If unset, then the value of
\fBcolor\&.ui\fR
is used (\fBauto\fR
by default)\&.
.RE
.PP
color\&.transport\&.rejected
.RS 4
Use customized color when a push was rejected\&.
.RE
.PP
color\&.ui
.RS 4
This variable determines the default value for variables such as
\fBcolor\&.diff\fR
and
\fBcolor\&.grep\fR
that control the use of color per command family\&. Its scope will expand as more commands learn configuration to set a default for the
\fB\-\-color\fR
option\&. Set it to
\fBfalse\fR
or
\fBnever\fR
if you prefer Git commands not to use color unless enabled explicitly with some other configuration or the
\fB\-\-color\fR
option\&. Set it to
\fBalways\fR
if you want all output not intended for machine consumption to use color, to
\fBtrue\fR
or
\fBauto\fR
(this is the default since Git 1\&.8\&.4) if you want such output to use color when written to the terminal\&.
.RE
.PP
column\&.ui
.RS 4
Specify whether supported commands should output in columns\&. This variable consists of a list of tokens separated by spaces or commas:
.sp
These options control when the feature should be enabled (defaults to
\fInever\fR):
.PP
\fBalways\fR
.RS 4
always show in columns
.RE
.PP
\fBnever\fR
.RS 4
never show in columns
.RE
.PP
\fBauto\fR
.RS 4
show in columns if the output is to the terminal
.RE
.sp
These options control layout (defaults to
\fIcolumn\fR)\&. Setting any of these implies
\fIalways\fR
if none of
\fIalways\fR,
\fInever\fR, or
\fIauto\fR
are specified\&.
.PP
\fBcolumn\fR
.RS 4
fill columns before rows
.RE
.PP
\fBrow\fR
.RS 4
fill rows before columns
.RE
.PP
\fBplain\fR
.RS 4
show in one column
.RE
.sp
Finally, these options can be combined with a layout option (defaults to
\fInodense\fR):
.PP
\fBdense\fR
.RS 4
make unequal size columns to utilize more space
.RE
.PP
\fBnodense\fR
.RS 4
make equal size columns
.RE
.RE
.PP
column\&.branch
.RS 4
Specify whether to output branch listing in
\fBgit branch\fR
in columns\&. See
\fBcolumn\&.ui\fR
for details\&.
.RE
.PP
column\&.clean
.RS 4
Specify the layout when list items in
\fBgit clean \-i\fR, which always shows files and directories in columns\&. See
\fBcolumn\&.ui\fR
for details\&.
.RE
.PP
column\&.status
.RS 4
Specify whether to output untracked files in
\fBgit status\fR
in columns\&. See
\fBcolumn\&.ui\fR
for details\&.
.RE
.PP
column\&.tag
.RS 4
Specify whether to output tag listing in
\fBgit tag\fR
in columns\&. See
\fBcolumn\&.ui\fR
for details\&.
.RE
.PP
commit\&.cleanup
.RS 4
This setting overrides the default of the
\fB\-\-cleanup\fR
option in
\fBgit commit\fR\&. See
\fBgit-commit\fR(1)
for details\&. Changing the default can be useful when you always want to keep lines that begin with comment character
\fB#\fR
in your log message, in which case you would do
\fBgit config commit\&.cleanup whitespace\fR
(note that you will have to remove the help lines that begin with
\fB#\fR
in the commit log template yourself, if you do this)\&.
.RE
.PP
commit\&.gpgSign
.RS 4
A boolean to specify whether all commits should be GPG signed\&. Use of this option when doing operations such as rebase can result in a large number of commits being signed\&. It may be convenient to use an agent to avoid typing your GPG passphrase several times\&.
.RE
.PP
commit\&.status
.RS 4
A boolean to enable/disable inclusion of status information in the commit message template when using an editor to prepare the commit message\&. Defaults to true\&.
.RE
.PP
commit\&.template
.RS 4
Specify the pathname of a file to use as the template for new commit messages\&.
.RE
.PP
commit\&.verbose
.RS 4
A boolean or int to specify the level of verbose with
\fBgit commit\fR\&. See
\fBgit-commit\fR(1)\&.
.RE
.PP
credential\&.helper
.RS 4
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\&. Note that multiple helpers may be defined\&. See
\fBgitcredentials\fR(7)
for details\&.
.RE
.PP
credential\&.useHttpPath
.RS 4
When acquiring credentials, consider the "path" component of an http or https URL to be important\&. Defaults to false\&. See
\fBgitcredentials\fR(7)
for more information\&.
.RE
.PP
credential\&.username
.RS 4
If no username is set for a network authentication, use this username by default\&. See credential\&.<context>\&.* below, and
\fBgitcredentials\fR(7)\&.
.RE
.PP
credential\&.<url>\&.*
.RS 4
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
\fBgitcredentials\fR(7)
for details on how URLs are matched\&.
.RE
.PP
credentialCache\&.ignoreSIGHUP
.RS 4
Tell git\-credential\-cache\(emdaemon to ignore SIGHUP, instead of quitting\&.
.RE
.PP
completion\&.commands
.RS 4
This is only used by git\-completion\&.bash to add or remove commands from the list of completed commands\&. Normally only porcelain commands and a few select others are completed\&. You can add more commands, separated by space, in this variable\&. Prefixing the command with
\fI\-\fR
will remove it from the existing list\&.
.RE
.PP
diff\&.autoRefreshIndex
.RS 4
When using
\fIgit diff\fR
to compare with work tree files, do not consider stat\-only change as changed\&. Instead, silently run
\fBgit update\-index \-\-refresh\fR
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
\fIgit diff\fR
Porcelain, and not lower level
\fIdiff\fR
commands such as
\fIgit diff\-files\fR\&.
.RE
.PP
diff\&.dirstat
.RS 4
A comma separated list of
\fB\-\-dirstat\fR
parameters specifying the default behavior of the
\fB\-\-dirstat\fR
option to
\fBgit-diff\fR(1)` and friends\&. The defaults can be overridden on the command line (using
\fB\-\-dirstat=<param1,param2,\&.\&.\&.>\fR)\&. The fallback defaults (when not changed by
\fBdiff\&.dirstat\fR) are
\fBchanges,noncumulative,3\fR\&. The following parameters are available:
.PP
\fBchanges\fR
.RS 4
Compute the dirstat numbers by counting the lines that have been removed from the source, or added to the destination\&. This ignores the amount of pure code movements within a file\&. In other words, rearranging lines in a file is not counted as much as other changes\&. This is the default behavior when no parameter is given\&.
.RE
.PP
\fBlines\fR
.RS 4
Compute the dirstat numbers by doing the regular line\-based diff analysis, and summing the removed/added line counts\&. (For binary files, count 64\-byte chunks instead, since binary files have no natural concept of lines)\&. This is a more expensive
\fB\-\-dirstat\fR
behavior than the
\fBchanges\fR
behavior, but it does count rearranged lines within a file as much as other changes\&. The resulting output is consistent with what you get from the other
\fB\-\-*stat\fR
options\&.
.RE
.PP
\fBfiles\fR
.RS 4
Compute the dirstat numbers by counting the number of files changed\&. Each changed file counts equally in the dirstat analysis\&. This is the computationally cheapest
\fB\-\-dirstat\fR
behavior, since it does not have to look at the file contents at all\&.
.RE
.PP
\fBcumulative\fR
.RS 4
Count changes in a child directory for the parent directory as well\&. Note that when using
\fBcumulative\fR, the sum of the percentages reported may exceed 100%\&. The default (non\-cumulative) behavior can be specified with the
\fBnoncumulative\fR
parameter\&.
.RE
.PP
<limit>
.RS 4
An integer parameter specifies a cut\-off percent (3% by default)\&. Directories contributing less than this percentage of the changes are not shown in the output\&.
.RE
.sp
Example: The following will count changed files, while ignoring directories with less than 10% of the total amount of changed files, and accumulating child directory counts in the parent directories:
\fBfiles,10,cumulative\fR\&.
.RE
.PP
diff\&.statGraphWidth
.RS 4
Limit the width of the graph part in \-\-stat output\&. If set, applies to all commands generating \-\-stat output except format\-patch\&.
.RE
.PP
diff\&.context
.RS 4
Generate diffs with <n> lines of context instead of the default of 3\&. This value is overridden by the \-U option\&.
.RE
.PP
diff\&.interHunkContext
.RS 4
Show the context between diff hunks, up to the specified number of lines, thereby fusing the hunks that are close to each other\&. This value serves as the default for the
\fB\-\-inter\-hunk\-context\fR
command line option\&.
.RE
.PP
diff\&.external
.RS 4
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 \(oqGIT_EXTERNAL_DIFF\(cq environment variable\&. The command is called with parameters as described under "git Diffs" in
\fBgit\fR(1)\&. Note: if you want to use an external diff program only on a subset of your files, you might want to use
\fBgitattributes\fR(5)
instead\&.
.RE
.PP
diff\&.ignoreSubmodules
.RS 4
Sets the default value of \-\-ignore\-submodules\&. Note that this affects only
\fIgit diff\fR
Porcelain, and not lower level
\fIdiff\fR
commands such as
\fIgit diff\-files\fR\&.
\fIgit checkout\fR
also honors this setting when reporting uncommitted changes\&. Setting it to
\fIall\fR
disables the submodule summary normally shown by
\fIgit commit\fR
and
\fIgit status\fR
when
\fBstatus\&.submoduleSummary\fR
is set unless it is overridden by using the \-\-ignore\-submodules command\-line option\&. The
\fIgit submodule\fR
commands are not affected by this setting\&.
.RE
.PP
diff\&.mnemonicPrefix
.RS 4
If set,
\fIgit diff\fR
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:
.PP
\fBgit diff\fR
.RS 4
compares the (i)ndex and the (w)ork tree;
.RE
.PP
\fBgit diff HEAD\fR
.RS 4
compares a (c)ommit and the (w)ork tree;
.RE
.PP
\fBgit diff \-\-cached\fR
.RS 4
compares a (c)ommit and the (i)ndex;
.RE
.PP
\fBgit diff HEAD:file1 file2\fR
.RS 4
compares an (o)bject and a (w)ork tree entity;
.RE
.PP
\fBgit diff \-\-no\-index a b\fR
.RS 4
compares two non\-git things (1) and (2)\&.
.RE
.RE
.PP
diff\&.noprefix
.RS 4
If set,
\fIgit diff\fR
does not show any source or destination prefix\&.
.RE
.PP
diff\&.orderFile
.RS 4
File indicating how to order files within a diff\&. See the
\fI\-O\fR
option to
\fBgit-diff\fR(1)
for details\&. If
\fBdiff\&.orderFile\fR
is a relative pathname, it is treated as relative to the top of the working tree\&.
.RE
.PP
diff\&.renameLimit
.RS 4
The number of files to consider when performing the copy/rename detection; equivalent to the
\fIgit diff\fR
option
\fB\-l\fR\&. This setting has no effect if rename detection is turned off\&.
.RE
.PP
diff\&.renames
.RS 4
Whether and how Git detects renames\&. If set to "false", rename detection is disabled\&. If set to "true", basic rename detection is enabled\&. If set to "copies" or "copy", Git will detect copies, as well\&. Defaults to true\&. Note that this affects only
\fIgit diff\fR
Porcelain like
\fBgit-diff\fR(1)
and
\fBgit-log\fR(1), and not lower level commands such as
\fBgit-diff-files\fR(1)\&.
.RE
.PP
diff\&.suppressBlankEmpty
.RS 4
A boolean to inhibit the standard behavior of printing a space before each empty output line\&. Defaults to false\&.
.RE
.PP
diff\&.submodule
.RS 4
Specify the format in which differences in submodules are shown\&. The "short" format just shows the names of the commits at the beginning and end of the range\&. The "log" format lists the commits in the range like
\fBgit-submodule\fR(1)
\fBsummary\fR
does\&. The "diff" format shows an inline diff of the changed contents of the submodule\&. Defaults to "short"\&.
.RE
.PP
diff\&.wordRegex
.RS 4
A POSIX Extended Regular Expression used to determine what is a "word" when performing word\-by\-word difference calculations\&. Character sequences that match the regular expression are "words", all other characters are
\fBignorable\fR
whitespace\&.
.RE
.PP
diff\&.<driver>\&.command
.RS 4
The custom diff driver command\&. See
\fBgitattributes\fR(5)
for details\&.
.RE
.PP
diff\&.<driver>\&.xfuncname
.RS 4
The regular expression that the diff driver should use to recognize the hunk header\&. A built\-in pattern may also be used\&. See
\fBgitattributes\fR(5)
for details\&.
.RE
.PP
diff\&.<driver>\&.binary
.RS 4
Set this option to true to make the diff driver treat files as binary\&. See
\fBgitattributes\fR(5)
for details\&.
.RE
.PP
diff\&.<driver>\&.textconv
.RS 4
The command that the diff driver should call to generate the text\-converted version of a file\&. The result of the conversion is used to generate a human\-readable diff\&. See
\fBgitattributes\fR(5)
for details\&.
.RE
.PP
diff\&.<driver>\&.wordRegex
.RS 4
The regular expression that the diff driver should use to split words in a line\&. See
\fBgitattributes\fR(5)
for details\&.
.RE
.PP
diff\&.<driver>\&.cachetextconv
.RS 4
Set this option to true to make the diff driver cache the text conversion outputs\&. See
\fBgitattributes\fR(5)
for details\&.
.RE
.PP
diff\&.tool
.RS 4
Controls which diff tool is used by
\fBgit-difftool\fR(1)\&. This variable overrides the value configured in
\fBmerge\&.tool\fR\&. The list below shows the valid built\-in values\&. Any other value is treated as a custom diff tool and requires that a corresponding difftool\&.<tool>\&.cmd variable is defined\&.
.RE
.PP
diff\&.guitool
.RS 4
Controls which diff tool is used by
\fBgit-difftool\fR(1)
when the \-g/\-\-gui flag is specified\&. This variable overrides the value configured in
\fBmerge\&.guitool\fR\&. The list below shows the valid built\-in values\&. Any other value is treated as a custom diff tool and requires that a corresponding difftool\&.<guitool>\&.cmd variable is defined\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
araxis
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
bc
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
bc3
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
codecompare
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
deltawalker
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
diffmerge
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
diffuse
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ecmerge
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
emerge
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
examdiff
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
guiffy
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\