Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
7791 lines (7707 sloc) 253 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.9" />
<title>git-config(1)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
/* Default font. */
body {
font-family: Georgia,serif;
}
/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
font-family: Arial,Helvetica,sans-serif;
}
body {
margin: 1em 5% 1em 5%;
}
a {
color: blue;
text-decoration: underline;
}
a:visited {
color: fuchsia;
}
em {
font-style: italic;
color: navy;
}
strong {
font-weight: bold;
color: #083194;
}
h1, h2, h3, h4, h5, h6 {
color: #527bbd;
margin-top: 1.2em;
margin-bottom: 0.5em;
line-height: 1.3;
}
h1, h2, h3 {
border-bottom: 2px solid silver;
}
h2 {
padding-top: 0.5em;
}
h3 {
float: left;
}
h3 + * {
clear: left;
}
h5 {
font-size: 1.0em;
}
div.sectionbody {
margin-left: 0;
}
hr {
border: 1px solid silver;
}
p {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
ul, ol, li > p {
margin-top: 0;
}
ul > li { color: #aaa; }
ul > li > * { color: black; }
.monospaced, code, pre {
font-family: "Courier New", Courier, monospace;
font-size: inherit;
color: navy;
padding: 0;
margin: 0;
}
pre {
white-space: pre-wrap;
}
#author {
color: #527bbd;
font-weight: bold;
font-size: 1.1em;
}
#email {
}
#revnumber, #revdate, #revremark {
}
#footer {
font-size: small;
border-top: 2px solid silver;
padding-top: 0.5em;
margin-top: 4.0em;
}
#footer-text {
float: left;
padding-bottom: 0.5em;
}
#footer-badges {
float: right;
padding-bottom: 0.5em;
}
#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.admonitionblock {
margin-top: 2.0em;
margin-bottom: 2.0em;
margin-right: 10%;
color: #606060;
}
div.content { /* Block element content. */
padding: 0;
}
/* Block element titles. */
div.title, caption.title {
color: #527bbd;
font-weight: bold;
text-align: left;
margin-top: 1.0em;
margin-bottom: 0.5em;
}
div.title + * {
margin-top: 0;
}
td div.title:first-child {
margin-top: 0.0em;
}
div.content div.title:first-child {
margin-top: 0.0em;
}
div.content + div.title {
margin-top: 0.0em;
}
div.sidebarblock > div.content {
background: #ffffee;
border: 1px solid #dddddd;
border-left: 4px solid #f0f0f0;
padding: 0.5em;
}
div.listingblock > div.content {
border: 1px solid #dddddd;
border-left: 5px solid #f0f0f0;
background: #f8f8f8;
padding: 0.5em;
}
div.quoteblock, div.verseblock {
padding-left: 1.0em;
margin-left: 1.0em;
margin-right: 10%;
border-left: 5px solid #f0f0f0;
color: #888;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
text-align: right;
}
div.verseblock > pre.content {
font-family: inherit;
font-size: inherit;
}
div.verseblock > div.attribution {
padding-top: 0.75em;
text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
text-align: left;
}
div.admonitionblock .icon {
vertical-align: top;
font-size: 1.1em;
font-weight: bold;
text-decoration: underline;
color: #527bbd;
padding-right: 0.5em;
}
div.admonitionblock td.content {
padding-left: 0.5em;
border-left: 3px solid #dddddd;
}
div.exampleblock > div.content {
border-left: 3px solid #dddddd;
padding-left: 0.5em;
}
div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
dt {
margin-top: 0.5em;
margin-bottom: 0;
font-style: normal;
color: navy;
}
dd > *:first-child {
margin-top: 0.1em;
}
ul, ol {
list-style-position: outside;
}
ol.arabic {
list-style-type: decimal;
}
ol.loweralpha {
list-style-type: lower-alpha;
}
ol.upperalpha {
list-style-type: upper-alpha;
}
ol.lowerroman {
list-style-type: lower-roman;
}
ol.upperroman {
list-style-type: upper-roman;
}
div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
margin-top: 0.1em;
margin-bottom: 0.1em;
}
tfoot {
font-weight: bold;
}
td > div.verse {
white-space: pre;
}
div.hdlist {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
div.hdlist tr {
padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
font-weight: bold;
}
td.hdlist1 {
vertical-align: top;
font-style: normal;
padding-right: 0.8em;
color: navy;
}
td.hdlist2 {
vertical-align: top;
}
div.hdlist.compact tr {
margin: 0;
padding-bottom: 0;
}
.comment {
background: yellow;
}
.footnote, .footnoteref {
font-size: 0.8em;
}
span.footnote, span.footnoteref {
vertical-align: super;
}
#footnotes {
margin: 20px 0 20px 0;
padding: 7px 0 0 0;
}
#footnotes div.footnote {
margin: 0 0 5px 0;
}
#footnotes hr {
border: none;
border-top: 1px solid silver;
height: 1px;
text-align: left;
margin-left: 0;
width: 20%;
min-width: 100px;
}
div.colist td {
padding-right: 0.5em;
padding-bottom: 0.3em;
vertical-align: top;
}
div.colist td img {
margin-top: 0.3em;
}
@media print {
#footer-badges { display: none; }
}
#toc {
margin-bottom: 2.5em;
}
#toctitle {
color: #527bbd;
font-size: 1.1em;
font-weight: bold;
margin-top: 1.0em;
margin-bottom: 0.1em;
}
div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
div.toclevel2 {
margin-left: 2em;
font-size: 0.9em;
}
div.toclevel3 {
margin-left: 4em;
font-size: 0.9em;
}
div.toclevel4 {
margin-left: 6em;
font-size: 0.9em;
}
span.aqua { color: aqua; }
span.black { color: black; }
span.blue { color: blue; }
span.fuchsia { color: fuchsia; }
span.gray { color: gray; }
span.green { color: green; }
span.lime { color: lime; }
span.maroon { color: maroon; }
span.navy { color: navy; }
span.olive { color: olive; }
span.purple { color: purple; }
span.red { color: red; }
span.silver { color: silver; }
span.teal { color: teal; }
span.white { color: white; }
span.yellow { color: yellow; }
span.aqua-background { background: aqua; }
span.black-background { background: black; }
span.blue-background { background: blue; }
span.fuchsia-background { background: fuchsia; }
span.gray-background { background: gray; }
span.green-background { background: green; }
span.lime-background { background: lime; }
span.maroon-background { background: maroon; }
span.navy-background { background: navy; }
span.olive-background { background: olive; }
span.purple-background { background: purple; }
span.red-background { background: red; }
span.silver-background { background: silver; }
span.teal-background { background: teal; }
span.white-background { background: white; }
span.yellow-background { background: yellow; }
span.big { font-size: 2em; }
span.small { font-size: 0.6em; }
span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
div.unbreakable { page-break-inside: avoid; }
/*
* xhtml11 specific
*
* */
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.tableblock > table {
border: 3px solid #527bbd;
}
thead, p.table.header {
font-weight: bold;
color: #527bbd;
}
p.table {
margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
border-style: none;
}
div.tableblock > table[frame="hsides"] {
border-left-style: none;
border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
border-top-style: none;
border-bottom-style: none;
}
/*
* html5 specific
*
* */
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
thead, p.tableblock.header {
font-weight: bold;
color: #527bbd;
}
p.tableblock {
margin-top: 0;
}
table.tableblock {
border-width: 3px;
border-spacing: 0px;
border-style: solid;
border-color: #527bbd;
border-collapse: collapse;
}
th.tableblock, td.tableblock {
border-width: 1px;
padding: 4px;
border-style: solid;
border-color: #527bbd;
}
table.tableblock.frame-topbot {
border-left-style: hidden;
border-right-style: hidden;
}
table.tableblock.frame-sides {
border-top-style: hidden;
border-bottom-style: hidden;
}
table.tableblock.frame-none {
border-style: hidden;
}
th.tableblock.halign-left, td.tableblock.halign-left {
text-align: left;
}
th.tableblock.halign-center, td.tableblock.halign-center {
text-align: center;
}
th.tableblock.halign-right, td.tableblock.halign-right {
text-align: right;
}
th.tableblock.valign-top, td.tableblock.valign-top {
vertical-align: top;
}
th.tableblock.valign-middle, td.tableblock.valign-middle {
vertical-align: middle;
}
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
vertical-align: bottom;
}
/*
* manpage specific
*
* */
body.manpage h1 {
padding-top: 0.5em;
padding-bottom: 0.5em;
border-top: 2px solid silver;
border-bottom: 2px solid silver;
}
body.manpage h2 {
border-style: none;
}
body.manpage div.sectionbody {
margin-left: 3em;
}
@media print {
body.manpage div#toc { display: none; }
}
</style>
<script type="text/javascript">
/*<![CDATA[*/
var asciidoc = { // Namespace.
/////////////////////////////////////////////////////////////////////
// Table Of Contents generator
/////////////////////////////////////////////////////////////////////
/* Author: Mihai Bazon, September 2002
* http://students.infoiasi.ro/~mishoo
*
* Table Of Content generator
* Version: 0.4
*
* Feel free to use this script under the terms of the GNU General Public
* License, as long as you do not remove or alter this notice.
*/
/* modified by Troy D. Hanson, September 2006. License: GPL */
/* modified by Stuart Rackham, 2006, 2009. License: GPL */
// toclevels = 1..4.
toc: function (toclevels) {
function getText(el) {
var text = "";
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
text += i.data;
else if (i.firstChild != null)
text += getText(i);
}
return text;
}
function TocEntry(el, text, toclevel) {
this.element = el;
this.text = text;
this.toclevel = toclevel;
}
function tocEntries(el, toclevels) {
var result = new Array;
var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
var iterate = function (el) {
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
var mo = re.exec(i.tagName);
if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
}
iterate(i);
}
}
}
iterate(el);
return result;
}
var toc = document.getElementById("toc");
if (!toc) {
return;
}
// Delete existing TOC entries in case we're reloading the TOC.
var tocEntriesToRemove = [];
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
}
for (i = 0; i < tocEntriesToRemove.length; i++) {
toc.removeChild(tocEntriesToRemove[i]);
}
// Rebuild TOC entries.
var entries = tocEntries(document.getElementById("content"), toclevels);
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (entry.element.id == "")
entry.element.id = "_toc_" + i;
var a = document.createElement("a");
a.href = "#" + entry.element.id;
a.appendChild(document.createTextNode(entry.text));
var div = document.createElement("div");
div.appendChild(a);
div.className = "toclevel" + entry.toclevel;
toc.appendChild(div);
}
if (entries.length == 0)
toc.parentNode.removeChild(toc);
},
/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////
/* Based on footnote generation code from:
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
*/
footnotes: function () {
// Delete existing footnote entries in case we're reloading the footnodes.
var i;
var noteholder = document.getElementById("footnotes");
if (!noteholder) {
return;
}
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
noteholder.removeChild(entriesToRemove[i]);
}
// Rebuild footnote entries.
var cont = document.getElementById("content");
var spans = cont.getElementsByTagName("span");
var refs = {};
var n = 0;
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnote") {
n++;
var note = spans[i].getAttribute("data-note");
if (!note) {
// Use [\s\S] in place of . so multi-line matches work.
// Because JavaScript has no s (dotall) regex flag.
note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
spans[i].innerHTML =
"[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
spans[i].setAttribute("data-note", note);
}
noteholder.innerHTML +=
"<div class='footnote' id='_footnote_" + n + "'>" +
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
n + "</a>. " + note + "</div>";
var id =spans[i].getAttribute("id");
if (id != null) refs["#"+id] = n;
}
}
if (n == 0)
noteholder.parentNode.removeChild(noteholder);
else {
// Process footnoterefs.
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnoteref") {
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
href = href.match(/#.*/)[0]; // Because IE return full URL.
n = refs[href];
spans[i].innerHTML =
"[<a href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
}
}
}
},
install: function(toclevels) {
var timerId;
function reinstall() {
asciidoc.footnotes();
if (toclevels) {
asciidoc.toc(toclevels);
}
}
function reinstallAndRemoveTimer() {
clearInterval(timerId);
reinstall();
}
timerId = setInterval(reinstall, 500);
if (document.addEventListener)
document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
else
window.onload = reinstallAndRemoveTimer;
}
}
asciidoc.install();
/*]]>*/
</script>
</head>
<body class="manpage">
<div id="header">
<h1>
git-config(1) Manual Page
</h1>
<h2>NAME</h2>
<div class="sectionbody">
<p>git-config -
Get and set repository or global options
</p>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
<pre class="content"><em>git config</em> [&lt;file-option&gt;] [type] [--show-origin] [-z|--null] name [value [value_regex]]
<em>git config</em> [&lt;file-option&gt;] [type] --add name value
<em>git config</em> [&lt;file-option&gt;] [type] --replace-all name value [value_regex]
<em>git config</em> [&lt;file-option&gt;] [type] [--show-origin] [-z|--null] --get name [value_regex]
<em>git config</em> [&lt;file-option&gt;] [type] [--show-origin] [-z|--null] --get-all name [value_regex]
<em>git config</em> [&lt;file-option&gt;] [type] [--show-origin] [-z|--null] [--name-only] --get-regexp name_regex [value_regex]
<em>git config</em> [&lt;file-option&gt;] [type] [-z|--null] --get-urlmatch name URL
<em>git config</em> [&lt;file-option&gt;] --unset name [value_regex]
<em>git config</em> [&lt;file-option&gt;] --unset-all name [value_regex]
<em>git config</em> [&lt;file-option&gt;] --rename-section old_name new_name
<em>git config</em> [&lt;file-option&gt;] --remove-section name
<em>git config</em> [&lt;file-option&gt;] [--show-origin] [-z|--null] [--name-only] -l | --list
<em>git config</em> [&lt;file-option&gt;] --get-color name [default]
<em>git config</em> [&lt;file-option&gt;] --get-colorbool name [stdout-is-tty]
<em>git config</em> [&lt;file-option&gt;] -e | --edit</pre>
<div class="attribution">
</div></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>Multiple lines can be added to an option by using the <code>--add</code> option.
If you want to update or unset an option which can occur on multiple
lines, a POSIX regexp <code>value_regex</code> 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 <strong>not</strong> match the regex, just
prepend a single exclamation mark in front (see also <a href="#EXAMPLES">[EXAMPLES]</a>).</p></div>
<div class="paragraph"><p>The type specifier can be either <code>--int</code> or <code>--bool</code>, to make
<em>git config</em> ensure that the variable(s) are of the given type and
convert the value to the canonical form (simple decimal number for int,
a "true" or "false" string for bool), or <code>--path</code>, which does some
path expansion (see <code>--path</code> below). If no type specifier is passed, no
checks or transformations are performed on the value.</p></div>
<div class="paragraph"><p>When reading, the values are read from the system, global and
repository local configuration files by default, and options
<code>--system</code>, <code>--global</code>, <code>--local</code> and <code>--file &lt;filename&gt;</code> can be
used to tell the command to read from only that location (see <a href="#FILES">[FILES]</a>).</p></div>
<div class="paragraph"><p>When writing, the new value is written to the repository local
configuration file by default, and options <code>--system</code>, <code>--global</code>,
<code>--file &lt;filename&gt;</code> can be used to tell the command to write to
that location (you can say <code>--local</code> but that is the default).</p></div>
<div class="paragraph"><p>This command will fail with non-zero status upon error. Some exit
codes are:</p></div>
<div class="ulist"><ul>
<li>
<p>
The section or key is invalid (ret=1),
</p>
</li>
<li>
<p>
no section or name was provided (ret=2),
</p>
</li>
<li>
<p>
the config file is invalid (ret=3),
</p>
</li>
<li>
<p>
the config file cannot be written (ret=4),
</p>
</li>
<li>
<p>
you try to unset an option which does not exist (ret=5),
</p>
</li>
<li>
<p>
you try to unset/set an option for which multiple lines match (ret=5), or
</p>
</li>
<li>
<p>
you try to use an invalid regexp (ret=6).
</p>
</li>
</ul></div>
<div class="paragraph"><p>On success, the command returns the exit code 0.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_options">OPTIONS</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
--replace-all
</dt>
<dd>
<p>
Default behavior is to replace at most one line. This replaces
all lines matching the key (and optionally the value_regex).
</p>
</dd>
<dt class="hdlist1">
--add
</dt>
<dd>
<p>
Adds a new line to the option without altering any existing
values. This is the same as providing <em>^$</em> as the value_regex
in <code>--replace-all</code>.
</p>
</dd>
<dt class="hdlist1">
--get
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
--get-all
</dt>
<dd>
<p>
Like get, but returns all values for a multi-valued key.
</p>
</dd>
<dt class="hdlist1">
--get-regexp
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
--get-urlmatch name URL
</dt>
<dd>
<p>
When given a two-part name section.key, the value for
section.&lt;url&gt;.key whose &lt;url&gt; 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.
</p>
</dd>
<dt class="hdlist1">
--global
</dt>
<dd>
<p>
For writing options: write to global <code>~/.gitconfig</code> file
rather than the repository <code>.git/config</code>, write to
<code>$XDG_CONFIG_HOME/git/config</code> file if this file exists and the
<code>~/.gitconfig</code> file doesn&#8217;t.
</p>
<div class="paragraph"><p>For reading options: read only from global <code>~/.gitconfig</code> and from
<code>$XDG_CONFIG_HOME/git/config</code> rather than from all available files.</p></div>
<div class="paragraph"><p>See also <a href="#FILES">[FILES]</a>.</p></div>
</dd>
<dt class="hdlist1">
--system
</dt>
<dd>
<p>
For writing options: write to system-wide
<code>$(prefix)/etc/gitconfig</code> rather than the repository
<code>.git/config</code>.
</p>
<div class="paragraph"><p>For reading options: read only from system-wide <code>$(prefix)/etc/gitconfig</code>
rather than from all available files.</p></div>
<div class="paragraph"><p>See also <a href="#FILES">[FILES]</a>.</p></div>
</dd>
<dt class="hdlist1">
--local
</dt>
<dd>
<p>
For writing options: write to the repository <code>.git/config</code> file.
This is the default behavior.
</p>
<div class="paragraph"><p>For reading options: read only from the repository <code>.git/config</code> rather than
from all available files.</p></div>
<div class="paragraph"><p>See also <a href="#FILES">[FILES]</a>.</p></div>
</dd>
<dt class="hdlist1">
-f config-file
</dt>
<dt class="hdlist1">
--file config-file
</dt>
<dd>
<p>
Use the given config file instead of the one specified by GIT_CONFIG.
</p>
</dd>
<dt class="hdlist1">
--blob blob
</dt>
<dd>
<p>
Similar to <code>--file</code> but use the given blob instead of a file. E.g.
you can use <em>master:.gitmodules</em> to read values from the file
<em>.gitmodules</em> in the master branch. See "SPECIFYING REVISIONS"
section in <a href="gitrevisions.html">gitrevisions(7)</a> for a more complete list of
ways to spell blob names.
</p>
</dd>
<dt class="hdlist1">
--remove-section
</dt>
<dd>
<p>
Remove the given section from the configuration file.
</p>
</dd>
<dt class="hdlist1">
--rename-section
</dt>
<dd>
<p>
Rename the given section to a new name.
</p>
</dd>
<dt class="hdlist1">
--unset
</dt>
<dd>
<p>
Remove the line matching the key from config file.
</p>
</dd>
<dt class="hdlist1">
--unset-all
</dt>
<dd>
<p>
Remove all lines matching the key from config file.
</p>
</dd>
<dt class="hdlist1">
-l
</dt>
<dt class="hdlist1">
--list
</dt>
<dd>
<p>
List all variables set in config file, along with their values.
</p>
</dd>
<dt class="hdlist1">
--bool
</dt>
<dd>
<p>
<em>git config</em> will ensure that the output is "true" or "false"
</p>
</dd>
<dt class="hdlist1">
--int
</dt>
<dd>
<p>
<em>git config</em> will ensure that the output is a simple
decimal number. An optional value suffix of <em>k</em>, <em>m</em>, or <em>g</em>
in the config file will cause the value to be multiplied
by 1024, 1048576, or 1073741824 prior to output.
</p>
</dd>
<dt class="hdlist1">
--bool-or-int
</dt>
<dd>
<p>
<em>git config</em> will ensure that the output matches the format of
either --bool or --int, as described above.
</p>
</dd>
<dt class="hdlist1">
--path
</dt>
<dd>
<p>
<em>git-config</em> will expand leading <em>&#126;</em> to the value of
<em>$HOME</em>, and <em>&#126;user</em> to the home directory for the
specified user. This option has no effect when setting the
value (but you can use <em>git config bla &#126;/</em> from the
command line to let your shell do the expansion).
</p>
</dd>
<dt class="hdlist1">
-z
</dt>
<dt class="hdlist1">
--null
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
--name-only
</dt>
<dd>
<p>
Output only the names of config variables for <code>--list</code> or
<code>--get-regexp</code>.
</p>
</dd>
<dt class="hdlist1">
--show-origin
</dt>
<dd>
<p>
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).
</p>
</dd>
<dt class="hdlist1">
--get-colorbool name [stdout-is-tty]
</dt>
<dd>
<p>
Find the color setting for <code>name</code> (e.g. <code>color.diff</code>) and output
"true" or "false". <code>stdout-is-tty</code> should be either "true" or
"false", and is taken into account when configuration says
"auto". If <code>stdout-is-tty</code> 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 <code>name</code> is undefined, the command uses
<code>color.ui</code> as fallback.
</p>
</dd>
<dt class="hdlist1">
--get-color name [default]
</dt>
<dd>
<p>
Find the color configured for <code>name</code> (e.g. <code>color.diff.new</code>) and
output it as the ANSI color escape sequence to the standard
output. The optional <code>default</code> parameter is used instead, if
there is no color configured for <code>name</code>.
</p>
</dd>
<dt class="hdlist1">
-e
</dt>
<dt class="hdlist1">
--edit
</dt>
<dd>
<p>
Opens an editor to modify the specified config file; either
<code>--system</code>, <code>--global</code>, or repository (default).
</p>
</dd>
<dt class="hdlist1">
--[no-]includes
</dt>
<dd>
<p>
Respect <code>include.*</code> directives in config files when looking up
values. Defaults to <code>off</code> when a specific file is given (e.g.,
using <code>--file</code>, <code>--global</code>, etc) and <code>on</code> when searching all
config files.
</p>
</dd>
</dl></div>
</div>
</div>
<div class="sect1">
<h2 id="FILES">FILES</h2>
<div class="sectionbody">
<div class="paragraph"><p>If not set explicitly with <code>--file</code>, there are four files where
<em>git config</em> will search for configuration options:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
$(prefix)/etc/gitconfig
</dt>
<dd>
<p>
System-wide configuration file.
</p>
</dd>
<dt class="hdlist1">
$XDG_CONFIG_HOME/git/config
</dt>
<dd>
<p>
Second user-specific configuration file. If $XDG_CONFIG_HOME is not set
or empty, <code>$HOME/.config/git/config</code> will be used. Any single-valued
variable set in this file will be overwritten by whatever is in
<code>~/.gitconfig</code>. 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.
</p>
</dd>
<dt class="hdlist1">
~/.gitconfig
</dt>
<dd>
<p>
User-specific configuration file. Also called "global"
configuration file.
</p>
</dd>
<dt class="hdlist1">
$GIT_DIR/config
</dt>
<dd>
<p>
Repository specific configuration file.
</p>
</dd>
</dl></div>
<div class="paragraph"><p>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, <em>git config</em> will exit with a non-zero
error code. However, in neither case will an error message be issued.</p></div>
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>You may override individual configuration parameters when running any git
command by using the <code>-c</code> option. See <a href="git.html">git(1)</a> for details.</p></div>
<div class="paragraph"><p>All writing options will per default write to the repository specific
configuration file. Note that this also affects options like <code>--replace-all</code>
and <code>--unset</code>. <strong><em>git config</em> will only ever change one file at a time</strong>.</p></div>
<div class="paragraph"><p>You can override these rules either by command-line options or by environment
variables. The <code>--global</code> and the <code>--system</code> options will limit the file used
to the global or system-wide file respectively. The <code>GIT_CONFIG</code> environment
variable has a similar effect, but you can specify any filename you want.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_environment">ENVIRONMENT</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
GIT_CONFIG
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
GIT_CONFIG_NOSYSTEM
</dt>
<dd>
<p>
Whether to skip reading settings from the system-wide
$(prefix)/etc/gitconfig file. See <a href="git.html">git(1)</a> for details.
</p>
</dd>
</dl></div>
<div class="paragraph"><p>See also <a href="#FILES">[FILES]</a>.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="EXAMPLES">EXAMPLES</h2>
<div class="sectionbody">
<div class="paragraph"><p>Given a .git/config like this:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>#
# This is the config file, and
# a '#' or ';' character indicates
# a comment
#</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>; core variables
[core]
; Don't trust file modes
filemode = false</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>; Our diff algorithm
[diff]
external = /usr/local/bin/diff-wrapper
renames = true</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>; Proxy settings
[core]
gitproxy=proxy-command for kernel.org
gitproxy=default-proxy ; for all the rest</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>; HTTP
[http]
sslVerify
[http "https://weak.example.com"]
sslVerify = false
cookieFile = /tmp/cookie.txt</code></pre>
</div></div>
<div class="paragraph"><p>you can set the filemode to true with</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config core.filemode true</code></pre>
</div></div>
<div class="paragraph"><p>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".</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config core.gitproxy '"ssh" for kernel.org' 'for kernel.org$'</code></pre>
</div></div>
<div class="paragraph"><p>This makes sure that only the key/value pair for kernel.org is replaced.</p></div>
<div class="paragraph"><p>To delete the entry for renames, do</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config --unset diff.renames</code></pre>
</div></div>
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>To query the value for a given key, do</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config --get core.filemode</code></pre>
</div></div>
<div class="paragraph"><p>or</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config core.filemode</code></pre>
</div></div>
<div class="paragraph"><p>or, to query a multivar:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config --get core.gitproxy "for kernel.org$"</code></pre>
</div></div>
<div class="paragraph"><p>If you want to know all the values for a multivar, do:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config --get-all core.gitproxy</code></pre>
</div></div>
<div class="paragraph"><p>If you like to live dangerously, you can replace <strong>all</strong> core.gitproxy by a
new one with</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config --replace-all core.gitproxy ssh</code></pre>
</div></div>
<div class="paragraph"><p>However, if you really only want to replace the line for the default proxy,
i.e. the one without a "for &#8230;" postfix, do something like this:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config core.gitproxy ssh '! for '</code></pre>
</div></div>
<div class="paragraph"><p>To actually match only values with an exclamation mark, you have to</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config section.key value '[!]'</code></pre>
</div></div>
<div class="paragraph"><p>To add a new proxy, without altering any of the existing ones, use</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config --add core.gitproxy '"proxy-command" for example.com'</code></pre>
</div></div>
<div class="paragraph"><p>An example to use customized color from the configuration in your
script:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>#!/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}"</code></pre>
</div></div>
<div class="paragraph"><p>For URLs in <code>https://weak.example.com</code>, <code>http.sslVerify</code> is set to
false, while it is set to <code>true</code> for all others:</p></div>
<div class="listingblock">
<div class="content">
<pre><code>% git config --bool --get-urlmatch http.sslverify https://good.example.com
true
% git config --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</code></pre>
</div></div>
</div>
</div>
<div class="sect1">
<h2 id="_configuration_file">CONFIGURATION FILE</h2>
<div class="sectionbody">
<div class="paragraph"><p>The Git configuration file contains a number of variables that affect
the Git commands' behavior. The <code>.git/config</code> file in each repository
is used to store the configuration for that repository, and
<code>$HOME/.gitconfig</code> is used to store a per-user configuration as
fallback values for the <code>.git/config</code> file. The file <code>/etc/gitconfig</code>
can be used to store a system-wide default configuration.</p></div>
<div class="paragraph"><p>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 <code>-</code>, and must start with an alphabetic character. Some
variables may appear multiple times; we say then that the variable is
multivalued.</p></div>
<div class="sect2">
<h3 id="_syntax">Syntax</h3>
<div class="paragraph"><p>The syntax is fairly flexible and permissive; whitespaces are mostly
ignored. The <em>#</em> and <em>;</em> characters begin comments to the end of line,
blank lines are ignored.</p></div>
<div class="paragraph"><p>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, <code>-</code> and <code>.</code> 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.</p></div>
<div class="paragraph"><p>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:</p></div>
<div class="listingblock">
<div class="content">
<pre><code> [section "subsection"]</code></pre>
</div></div>
<div class="paragraph"><p>Subsection names are case sensitive and can contain any characters except
newline (doublequote <code>"</code> and backslash can be included by escaping them
as <code>\"</code> and <code>\\</code>, respectively). Section headers cannot span multiple
lines. Variables may belong directly to a section or to a given subsection.
You can have <code>[section]</code> if you have <code>[section "subsection"]</code>, but you
don&#8217;t need to.</p></div>
<div class="paragraph"><p>There is also a deprecated <code>[section.subsection]</code> 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.</p></div>
<div class="paragraph"><p>All the other lines (and the remainder of the line after the section
header) are recognized as setting variables, in the form
<em>name = value</em> (or just <em>name</em>, 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 <code>-</code>, and must start with an alphabetic character.</p></div>
<div class="paragraph"><p>A line that defines a value can be continued to the next line by
ending it with a <code>\</code>; the backquote and the end-of-line are
stripped. Leading whitespaces after <em>name =</em>, the remainder of the
line after the first comment character <em>#</em> or <em>;</em>, and trailing
whitespaces of the line are discarded unless they are enclosed in
double quotes. Internal whitespaces within the value are retained
verbatim.</p></div>
<div class="paragraph"><p>Inside double quotes, double quote <code>"</code> and backslash <code>\</code> characters
must be escaped: use <code>\"</code> for <code>"</code> and <code>\\</code> for <code>\</code>.</p></div>
<div class="paragraph"><p>The following escape sequences (beside <code>\"</code> and <code>\\</code>) are recognized:
<code>\n</code> for newline character (NL), <code>\t</code> for horizontal tabulation (HT, TAB)
and <code>\b</code> for backspace (BS). Other char escape sequences (including octal
escape sequences) are invalid.</p></div>
</div>
<div class="sect2">
<h3 id="_includes">Includes</h3>
<div class="paragraph"><p>The <code>include</code> and <code>includeIf</code> sections allow you to include config
directives from another source. These sections behave identically to
each other with the exception that <code>includeIf</code> sections may be ignored
if their condition does not evaluate to true; see "Conditional includes"
below.</p></div>
<div class="paragraph"><p>You can include a config file from another by setting the special
<code>include.path</code> (or <code>includeIf.*.path</code>) 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.</p></div>
<div class="paragraph"><p>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.</p></div>
</div>
<div class="sect2">
<h3 id="_conditional_includes">Conditional includes</h3>
<div class="paragraph"><p>You can include a config file from another conditionally by setting a
<code>includeIf.&lt;condition&gt;.path</code> variable to the name of the file to be
included.</p></div>
<div class="paragraph"><p>The condition starts with a keyword followed by a colon and some data
whose format and meaning depends on the keyword. Supported keywords
are:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<code>gitdir</code>
</dt>
<dd>
<p>
The data that follows the keyword <code>gitdir:</code> is used as a glob
pattern. If the location of the .git directory matches the
pattern, the include condition is met.
</p>
<div class="paragraph"><p>The .git location may be auto-discovered, or come from <code>$GIT_DIR</code>
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.</p></div>
<div class="paragraph"><p>The pattern can contain standard globbing wildcards and two additional
ones, <code>**/</code> and <code>/**</code>, that can match multiple path components. Please
refer to <a href="gitignore.html">gitignore(5)</a> for details. For convenience:</p></div>
<div class="ulist"><ul>
<li>
<p>
If the pattern starts with <code>~/</code>, <code>~</code> will be substituted with the
content of the environment variable <code>HOME</code>.
</p>
</li>
<li>
<p>
If the pattern starts with <code>./</code>, it is replaced with the directory
containing the current config file.
</p>
</li>
<li>
<p>
If the pattern does not start with either <code>~/</code>, <code>./</code> or <code>/</code>, <code>**/</code>
will be automatically prepended. For example, the pattern <code>foo/bar</code>
becomes <code>**/foo/bar</code> and would match <code>/any/path/to/foo/bar</code>.
</p>
</li>
<li>
<p>
If the pattern ends with <code>/</code>, <code>**</code> will be automatically added. For
example, the pattern <code>foo/</code> becomes <code>foo/**</code>. In other words, it
matches "foo" and everything inside, recursively.
</p>
</li>
</ul></div>
</dd>
<dt class="hdlist1">
<code>gitdir/i</code>
</dt>
<dd>
<p>
This is the same as <code>gitdir</code> except that matching is done
case-insensitively (e.g. on case-insensitive file sytems)
</p>
</dd>
</dl></div>
<div class="paragraph"><p>A few more notes on matching via <code>gitdir</code> and <code>gitdir/i</code>:</p></div>
<div class="ulist"><ul>
<li>
<p>
Symlinks in <code>$GIT_DIR</code> are not resolved before matching.
</p>
</li>
<li>
<p>
Both the symlink &amp; realpath versions of paths will be matched
outside of <code>$GIT_DIR</code>. E.g. if ~/git is a symlink to
/mnt/storage/git, both <code>gitdir:~/git</code> and <code>gitdir:/mnt/storage/git</code>
will match.
</p>
<div class="paragraph"><p>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.</p></div>
</li>
<li>
<p>
Note that "../" is not special and will match literally, which is
unlikely what you want.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="_example">Example</h3>
<div class="literalblock">
<div class="content">
<pre><code># Core variables
[core]
; Don't trust file modes
filemode = false</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code># Our diff algorithm
[diff]
external = /usr/local/bin/diff-wrapper
renames = true</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>[branch "devel"]
remote = origin
merge = refs/heads/devel</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code># Proxy settings
[core]
gitProxy="ssh" for "kernel.org"
gitProxy=default-proxy ; for the rest</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>[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</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>; include if $GIT_DIR is /path/to/foo/.git
[includeIf "gitdir:/path/to/foo/.git"]
path = /path/to/foo.inc</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>; include for all repositories inside /path/to/group
[includeIf "gitdir:/path/to/group/"]
path = /path/to/foo.inc</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>; include for all repositories inside $HOME/to/group
[includeIf "gitdir:~/to/group/"]
path = /path/to/foo.inc</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>; 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</code></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_values">Values</h3>
<div class="paragraph"><p>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.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
boolean
</dt>
<dd>
<p>
When a variable is said to take a boolean value, many
synonyms are accepted for <em>true</em> and <em>false</em>; these are all
case-insensitive.
</p>
<div class="dlist"><dl>
<dt class="hdlist1">
true
</dt>
<dd>
<p>
Boolean true can be spelled as <code>yes</code>, <code>on</code>, <code>true</code>,
or <code>1</code>. Also, a variable defined without <code>= &lt;value&gt;</code>
is taken as true.
</p>
</dd>
<dt class="hdlist1">
false
</dt>
<dd>
<p>
Boolean false can be spelled as <code>no</code>, <code>off</code>,
<code>false</code>, or <code>0</code>.
</p>
<div class="paragraph"><p>When converting value to the canonical form using <code>--bool</code> type
specifier; <em>git config</em> will ensure that the output is "true" or
"false" (spelled in lowercase).</p></div>
</dd>
</dl></div>
</dd>
<dt class="hdlist1">
integer
</dt>
<dd>
<p>
The value for many variables that specify various sizes can
be suffixed with <code>k</code>, <code>M</code>,&#8230; to mean "scale the number by
1024", "by 1024x1024", etc.
</p>
</dd>
<dt class="hdlist1">
color
</dt>
<dd>
<p>
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.
</p>
<div class="paragraph"><p>The basic colors accepted are <code>normal</code>, <code>black</code>, <code>red</code>, <code>green</code>, <code>yellow</code>,
<code>blue</code>, <code>magenta</code>, <code>cyan</code> and <code>white</code>. The first color given is the
foreground; the second is the background.</p></div>
<div class="paragraph"><p>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 <code>#ff0ab3</code>.</p></div>
<div class="paragraph"><p>The accepted attributes are <code>bold</code>, <code>dim</code>, <code>ul</code>, <code>blink</code>, <code>reverse</code>,
<code>italic</code>, and <code>strike</code> (for crossed-out or "strikethrough" letters).
The position of any attributes with respect to the colors
(before, after, or in between), doesn&#8217;t matter. Specific attributes may
be turned off by prefixing them with <code>no</code> or <code>no-</code> (e.g., <code>noreverse</code>,
<code>no-ul</code>, etc).</p></div>
<div class="paragraph"><p>An empty color string produces no color effect at all. This can be used
to avoid coloring specific elements without disabling color entirely.</p></div>
<div class="paragraph"><p>For git&#8217;s pre-defined color slots, the attributes are meant to be reset
at the beginning of each item in the colored output. So setting
<code>color.decorate.branch</code> to <code>black</code> will paint that branch name in a
plain <code>black</code>, even if the previous thing on the same output line (e.g.
opening parenthesis before the list of branch names in <code>log --decorate</code>
output) is set to be painted with <code>bold</code> or some other attribute.
However, custom log formats may do more complicated and layered
coloring, and the negated forms may be useful there.</p></div>
</dd>
<dt class="hdlist1">
pathname
</dt>
<dd>
<p>
A variable that takes a pathname value can be given a
string that begins with "<code>~/</code>" or "<code>~user/</code>", and the usual
tilde expansion happens to such a string: <code>~/</code>
is expanded to the value of <code>$HOME</code>, and <code>~user/</code> to the
specified user&#8217;s home directory.
</p>
</dd>
</dl></div>
</div>
<div class="sect2">
<h3 id="_variables">Variables</h3>
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>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.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
advice.*
</dt>
<dd>
<p>
These variables control various optional help messages designed to
aid new users. All <em>advice.*</em> variables default to <em>true</em>, and you
can tell Git that you do not need help by setting these to <em>false</em>:
</p>
<div class="openblock">
<div class="content">
<div class="dlist"><dl>
<dt class="hdlist1">
pushUpdateRejected
</dt>
<dd>
<p>
Set this variable to <em>false</em> if you want to disable
<em>pushNonFFCurrent</em>,
<em>pushNonFFMatching</em>, <em>pushAlreadyExists</em>,
<em>pushFetchFirst</em>, and <em>pushNeedsForce</em>
simultaneously.
</p>
</dd>
<dt class="hdlist1">
pushNonFFCurrent
</dt>
<dd>
<p>
Advice shown when <a href="git-push.html">git-push(1)</a> fails due to a
non-fast-forward update to the current branch.
</p>
</dd>
<dt class="hdlist1">
pushNonFFMatching
</dt>
<dd>
<p>
Advice shown when you ran <a href="git-push.html">git-push(1)</a> and pushed
<em>matching refs</em> explicitly (i.e. you used <em>:</em>, or
specified a refspec that isn&#8217;t your current branch) and
it resulted in a non-fast-forward error.
</p>
</dd>
<dt class="hdlist1">
pushAlreadyExists
</dt>
<dd>
<p>
Shown when <a href="git-push.html">git-push(1)</a> rejects an update that
does not qualify for fast-forwarding (e.g., a tag.)
</p>
</dd>
<dt class="hdlist1">
pushFetchFirst
</dt>
<dd>
<p>
Shown when <a href="git-push.html">git-push(1)</a> rejects an update that
tries to overwrite a remote ref that points at an
object we do not have.
</p>
</dd>
<dt class="hdlist1">
pushNeedsForce
</dt>
<dd>
<p>
Shown when <a href="git-push.html">git-push(1)</a> 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.
</p>
</dd>
<dt class="hdlist1">
statusHints
</dt>
<dd>
<p>
Show directions on how to proceed from the current
state in the output of <a href="git-status.html">git-status(1)</a>, in
the template shown when writing commit messages in
<a href="git-commit.html">git-commit(1)</a>, and in the help message shown
by <a href="git-checkout.html">git-checkout(1)</a> when switching branch.
</p>
</dd>
<dt class="hdlist1">
statusUoption
</dt>
<dd>
<p>
Advise to consider using the <code>-u</code> option to <a href="git-status.html">git-status(1)</a>
when the command takes more than 2 seconds to enumerate untracked
files.
</p>
</dd>
<dt class="hdlist1">
commitBeforeMerge
</dt>
<dd>
<p>
Advice shown when <a href="git-merge.html">git-merge(1)</a> refuses to
merge to avoid overwriting local changes.
</p>
</dd>
<dt class="hdlist1">
resolveConflict
</dt>
<dd>
<p>
Advice shown by various commands when conflicts
prevent the operation from being performed.
</p>
</dd>
<dt class="hdlist1">
implicitIdentity
</dt>
<dd>
<p>
Advice on how to set your identity configuration when
your information is guessed from the system username and
domain name.
</p>
</dd>
<dt class="hdlist1">
detachedHead
</dt>
<dd>
<p>
Advice shown when you used <a href="git-checkout.html">git-checkout(1)</a> to
move to the detach HEAD state, to instruct how to create
a local branch after the fact.
</p>
</dd>
<dt class="hdlist1">
amWorkDir
</dt>
<dd>
<p>
Advice that shows the location of the patch file when
<a href="git-am.html">git-am(1)</a> fails to apply it.
</p>
</dd>
<dt class="hdlist1">
rmHints
</dt>
<dd>
<p>
In case of failure in the output of <a href="git-rm.html">git-rm(1)</a>,
show directions on how to proceed from the current state.
</p>
</dd>
<dt class="hdlist1">
addEmbeddedRepo
</dt>
<dd>
<p>
Advice on what to do when you&#8217;ve accidentally added one
git repo inside of another.
</p>
</dd>
</dl></div>
</div></div>
</dd>
<dt class="hdlist1">
core.fileMode
</dt>
<dd>
<p>
Tells Git if the executable bit of files in the working tree
is to be honored.
</p>
<div class="paragraph"><p>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.
<a href="git-clone.html">git-clone(1)</a> or <a href="git-init.html">git-init(1)</a> probe the filesystem
to see if it handles the executable bit correctly
and this variable is automatically set as necessary.</p></div>
<div class="paragraph"><p>A repository, however, may be on a filesystem that handles
the filemode correctly, and this variable is set to <em>true</em>
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 <em>false</em>.
See <a href="git-update-index.html">git-update-index(1)</a>.</p></div>
<div class="paragraph"><p>The default is true (when core.filemode is not specified in the config file).</p></div>
</dd>
<dt class="hdlist1">
core.hideDotFiles
</dt>
<dd>
<p>
(Windows-only) If true, mark newly-created directories and files whose
name starts with a dot as hidden. If <em>dotGitOnly</em>, only the <code>.git/</code>
directory is hidden, but no other files starting with a dot. The
default mode is <em>dotGitOnly</em>.
</p>
</dd>
<dt class="hdlist1">
core.ignoreCase
</dt>
<dd>
<p>
If true, this option enables various workarounds to enable
Git to work better on filesystems that are not case sensitive,
like FAT. 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".
</p>
<div class="paragraph"><p>The default is false, except <a href="git-clone.html">git-clone(1)</a> or <a href="git-init.html">git-init(1)</a>
will probe and set core.ignoreCase true if appropriate when the repository
is created.</p></div>
</dd>
<dt class="hdlist1">
core.precomposeUnicode
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
core.protectHFS
</dt>
<dd>
<p>
If set to true, do not allow checkout of paths that would
be considered equivalent to <code>.git</code> on an HFS+ filesystem.
Defaults to <code>true</code> on Mac OS, and <code>false</code> elsewhere.
</p>
</dd>
<dt class="hdlist1">
core.protectNTFS
</dt>
<dd>
<p>
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 <code>true</code> on Windows, and <code>false</code> elsewhere.
</p>
</dd>
<dt class="hdlist1">
core.trustctime
</dt>
<dd>
<p>
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 <a href="git-update-index.html">git-update-index(1)</a>. True by default.
</p>
</dd>
<dt class="hdlist1">
core.splitIndex
</dt>
<dd>
<p>
If true, the split-index feature of the index will be used.
See <a href="git-update-index.html">git-update-index(1)</a>. False by default.
</p>
</dd>
<dt class="hdlist1">
core.untrackedCache
</dt>
<dd>
<p>
Determines what to do about the untracked cache feature of the
index. It will be kept, if this variable is unset or set to
<code>keep</code>. It will automatically be added if set to <code>true</code>. And
it will automatically be removed, if set to <code>false</code>. Before
setting it to <code>true</code>, you should check that mtime is working
properly on your system.
See <a href="git-update-index.html">git-update-index(1)</a>. <code>keep</code> by default.
</p>
</dd>
<dt class="hdlist1">
core.checkStat
</dt>
<dd>
<p>
Determines which stat fields to match between the index
and work tree. The user can set this to <em>default</em> or
<em>minimal</em>. Default (or explicitly <em>default</em>), is to check
all fields, including the sub-second part of mtime and ctime.
</p>
</dd>
<dt class="hdlist1">
core.quotePath
</dt>
<dd>
<p>
Commands that output paths (e.g. <em>ls-files</em>, <em>diff</em>), 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.
<code>\t</code> for TAB, <code>\n</code> for LF, <code>\\</code> for backslash) or bytes with
values larger than 0x80 (e.g. octal <code>\302\265</code> 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 <code>-z</code> option. The default value
is true.
</p>
</dd>
<dt class="hdlist1">
core.eol
</dt>
<dd>
<p>
Sets the line ending type to use in the working directory for
files that have the <code>text</code> property set when core.autocrlf is false.
Alternatives are <em>lf</em>, <em>crlf</em> and <em>native</em>, which uses the platform&#8217;s
native line ending. The default value is <code>native</code>. See
<a href="gitattributes.html">gitattributes(5)</a> for more information on end-of-line
conversion.
</p>
</dd>
<dt class="hdlist1">
core.safecrlf
</dt>
<dd>
<p>
If true, makes Git check if converting <code>CRLF</code> 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
<code>core.autocrlf</code>, 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.
</p>
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>Note, this safety check does not mean that a checkout will generate a
file identical to the original file for a different setting of
<code>core.eol</code> and <code>core.autocrlf</code>, but only for the current one. For
example, a text file with <code>LF</code> would be accepted with <code>core.eol=lf</code>
and could later be checked out with <code>core.eol=crlf</code>, in which case the
resulting file would contain <code>CRLF</code>, although the original file
contained <code>LF</code>. However, in both work trees the line endings would be
consistent, that is either all <code>LF</code> or all <code>CRLF</code>, but never mixed. A
file with mixed line endings would be reported by the <code>core.safecrlf</code>
mechanism.</p></div>
</dd>
<dt class="hdlist1">
core.autocrlf
</dt>
<dd>
<p>
Setting this variable to "true" is the same as setting
the <code>text</code> attribute to "auto" on all files and core.eol to "crlf".
Set to true if you want to have <code>CRLF</code> line endings in your
working directory and the repository has LF line endings.
This variable can be set to <em>input</em>,
in which case no output conversion is performed.
</p>
</dd>
<dt class="hdlist1">
core.symlinks
</dt>
<dd>
<p>
If false, symbolic links are checked out as small plain files that
contain the link text. <a href="git-update-index.html">git-update-index(1)</a> and
<a href="git-add.html">git-add(1)</a> will not change the recorded type to regular
file. Useful on filesystems like FAT that do not support
symbolic links.
</p>
<div class="paragraph"><p>The default is true, except <a href="git-clone.html">git-clone(1)</a> or <a href="git-init.html">git-init(1)</a>
will probe and set core.symlinks false if appropriate when the repository
is created.</p></div>
</dd>
<dt class="hdlist1">
core.gitProxy
</dt>
<dd>
<p>
A "proxy command" to execute (as <em>command host port</em>) 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.
</p>
<div class="paragraph"><p>Can be overridden by the <code>GIT_PROXY_COMMAND</code> environment variable
(which always applies universally, without the special "for"
handling).</p></div>
<div class="paragraph"><p>The special string <code>none</code> 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.</p></div>
</dd>
<dt class="hdlist1">
core.sshCommand
</dt>
<dd>
<p>
If this variable is set, <code>git fetch</code> and <code>git push</code> will
use the specified command instead of <code>ssh</code> when they need to
connect to a remote system. The command is in the same form as
the <code>GIT_SSH_COMMAND</code> environment variable and is overridden
when the environment variable is set.
</p>
</dd>
<dt class="hdlist1">
core.ignoreStat
</dt>
<dd>
<p>
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.
</p>
<div class="paragraph"><p>When files are modified outside of Git, the user will need to stage
the modified files explicitly (e.g. see <em>Examples</em> section in
<a href="git-update-index.html">git-update-index(1)</a>).
Git will not normally detect changes to those files.</p></div>
<div class="paragraph"><p>This is useful on systems where lstat() calls are very slow, such as
CIFS/Microsoft Windows.</p></div>
<div class="paragraph"><p>False by default.</p></div>
</dd>
<dt class="hdlist1">
core.preferSymlinkRefs
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
core.bare
</dt>
<dd>
<p>
If true this repository is assumed to be <em>bare</em> 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 <a href="git-add.html">git-add(1)</a> or <a href="git-merge.html">git-merge(1)</a>.
</p>
<div class="paragraph"><p>This setting is automatically guessed by <a href="git-clone.html">git-clone(1)</a> or
<a href="git-init.html">git-init(1)</a> 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).</p></div>
</dd>
<dt class="hdlist1">
core.worktree
</dt>
<dd>
<p>
Set the path to the root of the working tree.
If <code>GIT_COMMON_DIR</code> environment variable is set, core.worktree
is ignored and not used for determining the root of working tree.
This can be overridden by the <code>GIT_WORK_TREE</code> environment
variable and the <code>--work-tree</code> 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.
</p>
<div class="paragraph"><p>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&#8217;s usual working tree).</p></div>
</dd>
<dt class="hdlist1">
core.logAllRefUpdates
</dt>
<dd>
<p>
Enable the reflog. Updates to a ref &lt;ref&gt; is logged to the file
"<code>$GIT_DIR/logs/&lt;ref&gt;</code>", 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 <code>true</code>, missing "<code>$GIT_DIR/logs/&lt;ref&gt;</code>"
file is automatically created for branch heads (i.e. under
<code>refs/heads/</code>), remote refs (i.e. under <code>refs/remotes/</code>),
note refs (i.e. under <code>refs/notes/</code>), and the symbolic ref <code>HEAD</code>.
If it is set to <code>always</code>, then a missing reflog is automatically
created for any ref under <code>refs/</code>.
</p>
<div class="paragraph"><p>This information can be used to determine what commit
was the tip of a branch "2 days ago".</p></div>
<div class="paragraph"><p>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.</p></div>
</dd>
<dt class="hdlist1">
core.repositoryFormatVersion
</dt>
<dd>
<p>
Internal variable identifying the repository format and layout
version.
</p>
</dd>
<dt class="hdlist1">
core.sharedRepository
</dt>
<dd>
<p>
When <em>group</em> (or <em>true</em>), the repository is made shareable between
several users in a group (making sure all the files and objects are
group-writable). When <em>all</em> (or <em>world</em> or <em>everybody</em>), the
repository will be readable by all users, additionally to being
group-shareable. When <em>umask</em> (or <em>false</em>), Git will use permissions
reported by umask(2). When <em>0xxx</em>, where <em>0xxx</em> is an octal number,
files in the repository will have this mode value. <em>0xxx</em> will override
user&#8217;s umask value (whereas the other options will only override
requested parts of the user&#8217;s umask value). Examples: <em>0660</em> will make
the repo read/write-able for the owner and group, but inaccessible to
others (equivalent to <em>group</em> unless umask is e.g. <em>0022</em>). <em>0640</em> is a
repository that is group-readable but not group-writable.
See <a href="git-init.html">git-init(1)</a>. False by default.
</p>
</dd>
<dt class="hdlist1">
core.warnAmbiguousRefs
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
core.compression
</dt>
<dd>
<p>
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 <code>core.looseCompression</code> and <code>pack.compression</code>.
</p>
</dd>
<dt class="hdlist1">
core.looseCompression
</dt>
<dd>
<p>
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).
</p>
</dd>
<dt class="hdlist1">
core.packedGitWindowSize
</dt>
<dd>
<p>
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&#8217;s
memory manager, but may improve performance when accessing
a large number of large pack files.
</p>
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>Common unit suffixes of <em>k</em>, <em>m</em>, or <em>g</em> are supported.</p></div>
</dd>
<dt class="hdlist1">
core.packedGitLimit
</dt>
<dd>
<p>
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.
</p>
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>Common unit suffixes of <em>k</em>, <em>m</em>, or <em>g</em> are supported.</p></div>
</dd>
<dt class="hdlist1">
core.deltaBaseCacheLimit
</dt>
<dd>
<p>
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.
</p>
<div class="paragraph"><p>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.</p></div>
<div class="paragraph"><p>Common unit suffixes of <em>k</em>, <em>m</em>, or <em>g</em> are supported.</p></div>
</dd>
<dt class="hdlist1">
core.bigFileThreshold
</dt>
<dd>
<p>
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.
</p>
<div class="paragraph"><p>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&#8217;t be.</p></div>
<div class="paragraph"><p>Common unit suffixes of <em>k</em>, <em>m</em>, or <em>g</em> are supported.</p></div>
</dd>
<dt class="hdlist1">
core.excludesFile
</dt>
<dd>
<p>
Specifies the pathname to the file that contains patterns to
describe paths that are not meant to be tracked, in addition
to <em>.gitignore</em> (per-directory) and <em>.git/info/exclude</em>.
Defaults to <code>$XDG_CONFIG_HOME/git/ignore</code>.
If <code>$XDG_CONFIG_HOME</code> is either not set or empty, <code>$HOME/.config/git/ignore</code>
is used instead. See <a href="gitignore.html">gitignore(5)</a>.
</p>
</dd>
<dt class="hdlist1">
core.askPass
</dt>
<dd>
<p>
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 <code>GIT_ASKPASS</code>
environment variable. If not set, fall back to the value of the
<code>SSH_ASKPASS</code> 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.
</p>
</dd>
<dt class="hdlist1">
core.attributesFile
</dt>
<dd>
<p>
In addition to <em>.gitattributes</em> (per-directory) and
<em>.git/info/attributes</em>, Git looks into this file for attributes
(see <a href="gitattributes.html">gitattributes(5)</a>). Path expansions are made the same
way as for <code>core.excludesFile</code>. Its default value is
<code>$XDG_CONFIG_HOME/git/attributes</code>. If <code>$XDG_CONFIG_HOME</code> is either not
set or empty, <code>$HOME/.config/git/attributes</code> is used instead.
</p>
</dd>
<dt class="hdlist1">
core.hooksPath
</dt>
<dd>
<p>
By default Git will look for your hooks in the
<em>$GIT_DIR/hooks</em> directory. Set this to different path,
e.g. <em>/etc/git/hooks</em>, and Git will try to find your hooks in
that directory, e.g. <em>/etc/git/hooks/pre-receive</em> instead of
in <em>$GIT_DIR/hooks/pre-receive</em>.
</p>
<div class="paragraph"><p>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 <a href="githooks.html">githooks(5)</a>).</p></div>
<div class="paragraph"><p>This configuration variable is useful in cases where you&#8217;d 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 <code>init.templateDir</code> where you&#8217;ve changed
default hooks.</p></div>
</dd>
<dt class="hdlist1">
core.editor
</dt>
<dd>
<p>
Commands such as <code>commit</code> and <code>tag</code> that let you edit
messages by launching an editor use the value of this
variable when it is set, and the environment variable
<code>GIT_EDITOR</code> is not set. See <a href="git-var.html">git-var(1)</a>.
</p>
</dd>
<dt class="hdlist1">
core.commentChar
</dt>
<dd>
<p>
Commands such as <code>commit</code> and <code>tag</code> that let you edit
messages consider a line that begins with this character
commented, and removes them after the editor returns
(default <em>#</em>).
</p>
<div class="paragraph"><p>If set to "auto", <code>git-commit</code> would select a character that is not
the beginning character of any line in existing commit messages.</p></div>
</dd>
<dt class="hdlist1">
core.packedRefsTimeout
</dt>
<dd>
<p>
The length of time, in milliseconds, to retry when trying to
lock the <code>packed-refs</code> file. Value 0 means not to retry at
all; -1 means to try indefinitely. Default is 1000 (i.e.,
retry for 1 second).
</p>
</dd>
<dt class="hdlist1">
sequence.editor
</dt>
<dd>
<p>
Text editor used by <code>git rebase -i</code> for editing the rebase instruction file.
The value is meant to be interpreted by the shell when it is used.
It can be overridden by the <code>GIT_SEQUENCE_EDITOR</code> environment variable.
When not configured the default commit message editor is used instead.
</p>
</dd>
<dt class="hdlist1">
core.pager
</dt>
<dd>
<p>
Text viewer for use by Git commands (e.g., <em>less</em>). The value
is meant to be interpreted by the shell. The order of preference
is the <code>$GIT_PAGER</code> environment variable, then <code>core.pager</code>
configuration, then <code>$PAGER</code>, and then the default chosen at
compile time (usually <em>less</em>).
</p>
<div class="paragraph"><p>When the <code>LESS</code> environment variable is unset, Git sets it to <code>FRX</code>
(if <code>LESS</code> environment variable is set, Git does not change it at
all). If you want to selectively override Git&#8217;s default setting
for <code>LESS</code>, you can set <code>core.pager</code> to e.g. <code>less -S</code>. This will
be passed to the shell by Git, which will translate the final
command to <code>LESS=FRX less -S</code>. The environment does not set the
<code>S</code> option but the command line does, instructing less to truncate
long lines. Similarly, setting <code>core.pager</code> to <code>less -+F</code> will
deactivate the <code>F</code> option specified by the environment from the
command-line, deactivating the "quit if one screen" behavior of
<code>less</code>. One can specifically activate some flags for particular
commands: for example, setting <code>pager.blame</code> to <code>less -S</code> enables
line truncation only for <code>git blame</code>.</p></div>
<div class="paragraph"><p>Likewise, when the <code>LV</code> environment variable is unset, Git sets it
to <code>-c</code>. You can override this setting by exporting <code>LV</code> with
another value or setting <code>core.pager</code> to <code>lv +c</code>.</p></div>
</dd>
<dt class="hdlist1">
core.whitespace
</dt>
<dd>
<p>
A comma separated list of common whitespace problems to
notice. <em>git diff</em> will use <code>color.diff.whitespace</code> to
highlight them, and <em>git apply --whitespace=error</em> will
consider them as errors. You can prefix <code>-</code> to disable
any of them (e.g. <code>-trailing-space</code>):
</p>
<div class="ulist"><ul>
<li>
<p>
<code>blank-at-eol</code> treats trailing whitespaces at the end of the line
as an error (enabled by default).
</p>
</li>
<li>
<p>
<code>space-before-tab</code> 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).
</p>
</li>
<li>
<p>
<code>indent-with-non-tab</code> treats a line that is indented with space
characters instead of the equivalent tabs as an error (not enabled by
default).
</p>
</li>
<li>
<p>
<code>tab-in-indent</code> treats a tab character in the initial indent part of
the line as an error (not enabled by default).
</p>
</li>
<li>
<p>
<code>blank-at-eof</code> treats blank lines added at the end of file as an error
(enabled by default).
</p>
</li>
<li>
<p>
<code>trailing-space</code> is a short-hand to cover both <code>blank-at-eol</code> and
<code>blank-at-eof</code>.
</p>
</li>
<li>
<p>
<code>cr-at-eol</code> treats a carriage-return at the end of line as
part of the line terminator, i.e. with it, <code>trailing-space</code>
does not trigger if the character before such a carriage-return
is not a whitespace (not enabled by default).
</p>
</li>
<li>
<p>
<code>tabwidth=&lt;n&gt;</code> tells how many character positions a tab occupies; this
is relevant for <code>indent-with-non-tab</code> and when Git fixes <code>tab-in-indent</code>
errors. The default tab width is 8. Allowed values are 1 to 63.
</p>
</li>
</ul></div>
</dd>
<dt class="hdlist1">
core.fsyncObjectFiles
</dt>
<dd>
<p>
This boolean will enable <em>fsync()</em> when writing object files.
</p>
<div class="paragraph"><p>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&#8217;s HFS+, or Linux ext3 with "data=writeback").</p></div>
</dd>
<dt class="hdlist1">
core.preloadIndex
</dt>
<dd>
<p>
Enable parallel index preload for operations like <em>git diff</em>
</p>
<div class="paragraph"><p>This can speed up operations like <em>git diff</em> and <em>git status</em> 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&#8217;s. Defaults to true.</p></div>
</dd>
<dt class="hdlist1">
core.createObject
</dt>
<dd>
<p>
You can set this to <em>link</em>, 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.
</p>
<div class="paragraph"><p>On some file system/operating system combinations, this is unreliable.
Set this config setting to <em>rename</em> there; However, This will remove the
check that makes sure that existing object files will not get overwritten.</p></div>
</dd>
<dt class="hdlist1">
core.notesRef
</dt>
<dd>
<p>
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.
</p>
<div class="paragraph"><p>This setting defaults to "refs/notes/commits", and it can be overridden by
the <code>GIT_NOTES_REF</code> environment variable. See <a href="git-notes.html">git-notes(1)</a>.</p></div>
</dd>
<dt class="hdlist1">
core.sparseCheckout
</dt>
<dd>
<p>
Enable "sparse checkout" feature. See section "Sparse checkout" in
<a href="git-read-tree.html">git-read-tree(1)</a> for more information.
</p>
</dd>
<dt class="hdlist1">
core.abbrev
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
add.ignoreErrors
</dt>
<dt class="hdlist1">
add.ignore-errors (deprecated)
</dt>
<dd>
<p>
Tells <em>git add</em> to continue adding files when some files cannot be
added due to indexing errors. Equivalent to the <code>--ignore-errors</code>
option of <a href="git-add.html">git-add(1)</a>. <code>add.ignore-errors</code> is deprecated,
as it does not follow the usual naming convention for configuration
variables.
</p>
</dd>
<dt class="hdlist1">
alias.*
</dt>
<dd>
<p>
Command aliases for the <a href="git.html">git(1)</a> 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.
</p>
<div class="paragraph"><p>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.
<code>GIT_PREFIX</code> is set as returned by running <em>git rev-parse --show-prefix</em>
from the original current directory. See <a href="git-rev-parse.html">git-rev-parse(1)</a>.</p></div>
</dd>
<dt class="hdlist1">
am.keepcr
</dt>
<dd>
<p>
If true, git-am will call git-mailsplit for patches in mbox format
with parameter <code>--keep-cr</code>. In this case git-mailsplit will
not remove <code>\r</code> from lines ending with <code>\r\n</code>. Can be overridden
by giving <code>--no-keep-cr</code> from the command line.
See <a href="git-am.html">git-am(1)</a>, <a href="git-mailsplit.html">git-mailsplit(1)</a>.
</p>
</dd>
<dt class="hdlist1">
am.threeWay
</dt>
<dd>
<p>
By default, <code>git am</code> will fail if the patch does not apply cleanly. When
set to true, this setting tells <code>git am</code> 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 <code>--3way</code>
option from the command line). Defaults to <code>false</code>.
See <a href="git-am.html">git-am(1)</a>.
</p>
</dd>
<dt class="hdlist1">
apply.ignoreWhitespace
</dt>
<dd>
<p>
When set to <em>change</em>, tells <em>git apply</em> to ignore changes in
whitespace, in the same way as the <code>--ignore-space-change</code>
option.
When set to one of: no, none, never, false tells <em>git apply</em> to
respect all whitespace differences.
See <a href="git-apply.html">git-apply(1)</a>.
</p>
</dd>
<dt class="hdlist1">
apply.whitespace
</dt>
<dd>
<p>
Tells <em>git apply</em> how to handle whitespaces, in the same way
as the <code>--whitespace</code> option. See <a href="git-apply.html">git-apply(1)</a>.
</p>
</dd>
<dt class="hdlist1">
branch.autoSetupMerge
</dt>
<dd>
<p>
Tells <em>git branch</em> and <em>git checkout</em> to set up new branches
so that <a href="git-pull.html">git-pull(1)</a> 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 <code>--track</code>
and <code>--no-track</code> options. The valid settings are: <code>false</code>&#8201;&#8212;&#8201;no
automatic setup is done; <code>true</code>&#8201;&#8212;&#8201;automatic setup is done when the
starting point is a remote-tracking branch; <code>always</code>&#8201;&#8212;&#8201; automatic setup is done when the starting point is either a
local branch or remote-tracking
branch. This option defaults to true.
</p>
</dd>
<dt class="hdlist1">
branch.autoSetupRebase
</dt>
<dd>
<p>
When a new branch is created with <em>git branch</em> or <em>git checkout</em>
that tracks another branch, this variable tells Git to set
up pull to rebase instead of merge (see "branch.&lt;name&gt;.rebase").
When <code>never</code>, rebase is never automatically set to true.
When <code>local</code>, rebase is set to true for tracked branches of
other local branches.
When <code>remote</code>, rebase is set to true for tracked branches of
remote-tracking branches.
When <code>always</code>, 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.
</p>
</dd>
<dt class="hdlist1">
branch.&lt;name&gt;.remote
</dt>
<dd>
<p>
When on branch &lt;name&gt;, it tells <em>git fetch</em> and <em>git push</em>
which remote to fetch from/push to. The remote to push to
may be overridden with <code>remote.pushDefault</code> (for all branches).
The remote to push to, for the current branch, may be further
overridden by <code>branch.&lt;name&gt;.pushRemote</code>. If no remote is
configured, or if you are not on any branch, it defaults to
<code>origin</code> for fetching and <code>remote.pushDefault</code> for pushing.
Additionally, <code>.</code> (a period) is the current local repository
(a dot-repository), see <code>branch.&lt;name&gt;.merge</code>'s final note below.
</p>
</dd>
<dt class="hdlist1">
branch.&lt;name&gt;.pushRemote
</dt>
<dd>
<p>
When on branch &lt;name&gt;, it overrides <code>branch.&lt;name&gt;.remote</code> for
pushing. It also overrides <code>remote.pushDefault</code> for pushing
from branch &lt;name&gt;. 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 <code>remote.pushDefault</code> to
specify the remote to push to for all branches, and use this
option to override it for a specific branch.
</p>
</dd>
<dt class="hdlist1">
branch.&lt;name&gt;.merge
</dt>
<dd>
<p>
Defines, together with branch.&lt;name&gt;.remote, the upstream branch
for the given branch. It tells <em>git fetch</em>/<em>git pull</em>/<em>git rebase</em> which
branch to merge and can also affect <em>git push</em> (see push.default).
When in branch &lt;name&gt;, it tells <em>git fetch</em> 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.&lt;name&gt;.remote".
The merge information is used by <em>git pull</em> (which at first calls
<em>git fetch</em>) to lookup the default branch for merging. Without
this option, <em>git pull</em> defaults to merge the first refspec fetched.
Specify multiple values to get an octopus merge.
If you wish to setup <em>git pull</em> so that it merges into &lt;name&gt; from
another branch in the local repository, you can point
branch.&lt;name&gt;.merge to the desired branch, and use the relative path
setting <code>.</code> (a period) for branch.&lt;name&gt;.remote.
</p>
</dd>
<dt class="hdlist1">
branch.&lt;name&gt;.mergeOptions
</dt>
<dd>
<p>
Sets default options for merging into branch &lt;name&gt;. The syntax and
supported options are the same as those of <a href="git-merge.html">git-merge(1)</a>, but
option values containing whitespace characters are currently not
supported.
</p>
</dd>
<dt class="hdlist1">
branch.&lt;name&gt;.rebase
</dt>
<dd>
<p>
When true, rebase the branch &lt;name&gt; 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.
</p>
<div class="paragraph"><p>When preserve, also pass <code>--preserve-merges</code> along to <em>git rebase</em>
so that locally committed merge commits will not be flattened
by running <em>git pull</em>.</p></div>
<div class="paragraph"><p>When the value is <code>interactive</code>, the rebase is run in interactive mode.</p></div>
<div class="paragraph"><p><strong>NOTE</strong>: this is a possibly dangerous operation; do <strong>not</strong> use
it unless you understand the implications (see <a href="git-rebase.html">git-rebase(1)</a>
for details).</p></div>
</dd>
<dt class="hdlist1">
branch.&lt;name&gt;.description
</dt>
<dd>
<p>
Branch description, can be edited with
<code>git branch --edit-description</code>. Branch description is
automatically added in the format-patch cover letter or
request-pull summary.
</p>
</dd>
<dt class="hdlist1">
browser.&lt;tool&gt;.cmd
</dt>
<dd>
<p>
Specify the command to invoke the specified browser. The
specified command is evaluated in shell with the URLs passed
as arguments. (See <a href="git-web&#45;&#45;browse.html">git-web&#45;&#45;browse(1)</a>.)
</p>
</dd>
<dt class="hdlist1">
browser.&lt;tool&gt;.path
</dt>
<dd>
<p>
Override the path for the given tool that may be used to
browse HTML help (see <code>-w</code> option in <a href="git-help.html">git-help(1)</a>) or a
working repository in gitweb (see <a href="git-instaweb.html">git-instaweb(1)</a>).
</p>
</dd>
<dt class="hdlist1">
clean.requireForce
</dt>
<dd>
<p>
A boolean to make git-clean do nothing unless given -f,
-i or -n. Defaults to true.
</p>
</dd>
<dt class="hdlist1">
color.branch
</dt>
<dd>
<p>
A boolean to enable/disable color in the output of
<a href="git-branch.html">git-branch(1)</a>. May be set to <code>always</code>,
<code>false</code> (or <code>never</code>) or <code>auto</code> (or <code>true</code>), in which case colors are used
only when the output is to a terminal. If unset, then the
value of <code>color.ui</code> is used (<code>auto</code> by default).
</p>
</dd>
<dt class="hdlist1">
color.branch.&lt;slot&gt;
</dt>
<dd>
<p>
Use customized color for branch coloration. <code>&lt;slot&gt;</code> is one of
<code>current</code> (the current branch), <code>local</code> (a local branch),
<code>remote</code> (a remote-tracking branch in refs/remotes/),
<code>upstream</code> (upstream tracking branch), <code>plain</code> (other
refs).
</p>
</dd>
<dt class="hdlist1">
color.diff
</dt>
<dd>
<p>
Whether to use ANSI escape sequences to add color to patches.
If this is set to <code>always</code>, <a href="git-diff.html">git-diff(1)</a>,
<a href="git-log.html">git-log(1)</a>, and <a href="git-show.html">git-show(1)</a> will use color
for all patches. If it is set to <code>true</code> or <code>auto</code>, those
commands will only use color when output is to the terminal.
If unset, then the value of <code>color.ui</code> is used (<code>auto</code> by
default).
</p>
<div class="paragraph"><p>This does not affect <a href="git-format-patch.html">git-format-patch(1)</a> or the
<em>git-diff-&#42;</em> plumbing commands. Can be overridden on the
command line with the <code>--color[=&lt;when&gt;]</code> option.</p></div>
</dd>
<dt class="hdlist1">
color.diff.&lt;slot&gt;
</dt>
<dd>
<p>
Use customized color for diff colorization. <code>&lt;slot&gt;</code> specifies
which part of the patch to use the specified color, and is one
of <code>context</code> (context text - <code>plain</code> is a historical synonym),
<code>meta</code> (metainformation), <code>frag</code>
(hunk header), <em>func</em> (function in hunk header), <code>old</code> (removed lines),
<code>new</code> (added lines), <code>commit</code> (commit headers), or <code>whitespace</code>
(highlighting whitespace errors).
</p>
</dd>
<dt class="hdlist1">
color.decorate.&lt;slot&gt;
</dt>
<dd>
<p>
Use customized color for <em>git log --decorate</em> output. <code>&lt;slot&gt;</code> is one
of <code>branch</code>, <code>remoteBranch</code>, <code>tag</code>, <code>stash</code> or <code>HEAD</code> for local
branches, remote-tracking branches, tags, stash and HEAD, respectively.
</p>
</dd>
<dt class="hdlist1">
color.grep
</dt>
<dd>
<p>
When set to <code>always</code>, always highlight matches. When <code>false</code> (or
<code>never</code>), never. When set to <code>true</code> or <code>auto</code>, use color only
when the output is written to the terminal. If unset, then the
value of <code>color.ui</code> is used (<code>auto</code> by default).
</p>
</dd>
<dt class="hdlist1">
color.grep.&lt;slot&gt;
</dt>
<dd>
<p>
Use customized color for grep colorization. <code>&lt;slot&gt;</code> specifies which
part of the line to use the specified color, and is one of
</p>
<div class="openblock">
<div class="content">
<div class="dlist"><dl>
<dt class="hdlist1">
<code>context</code>
</dt>
<dd>
<p>
non-matching text in context lines (when using <code>-A</code>, <code>-B</code>, or <code>-C</code>)
</p>
</dd>
<dt class="hdlist1">
<code>filename</code>
</dt>
<dd>
<p>
filename prefix (when not using <code>-h</code>)
</p>
</dd>
<dt class="hdlist1">
<code>function</code>
</dt>
<dd>
<p>
function name lines (when using <code>-p</code>)
</p>
</dd>
<dt class="hdlist1">
<code>linenumber</code>
</dt>
<dd>
<p>
line number prefix (when using <code>-n</code>)
</p>
</dd>
<dt class="hdlist1">
<code>match</code>
</dt>
<dd>
<p>
matching text (same as setting <code>matchContext</code> and <code>matchSelected</code>)
</p>
</dd>
<dt class="hdlist1">
<code>matchContext</code>
</dt>
<dd>
<p>
matching text in context lines
</p>
</dd>
<dt class="hdlist1">
<code>matchSelected</code>
</dt>
<dd>
<p>
matching text in selected lines
</p>
</dd>
<dt class="hdlist1">
<code>selected</code>
</dt>
<dd>
<p>
non-matching text in selected lines
</p>
</dd>
<dt class="hdlist1">
<code>separator</code>
</dt>
<dd>
<p>
separators between fields on a line (<code>:</code>, <code>-</code>, and <code>=</code>)
and between hunks (<code>--</code>)
</p>
</dd>
</dl></div>
</div></div>
</dd>
<dt class="hdlist1">
color.interactive
</dt>
<dd>
<p>
When set to <code>always</code>, always use colors for interactive prompts
and displays (such as those used by "git-add --interactive" and
"git-clean --interactive"). When false (or <code>never</code>), never.
When set to <code>true</code> or <code>auto</code>, use colors only when the output is
to the terminal. If unset, then the value of <code>color.ui</code> is
used (<code>auto</code> by default).
</p>
</dd>
<dt class="hdlist1">
color.interactive.&lt;slot&gt;
</dt>
<dd>
<p>
Use customized color for <em>git add --interactive</em> and <em>git clean
--interactive</em> output. <code>&lt;slot&gt;</code> may be <code>prompt</code>, <code>header</code>, <code>help</code>
or <code>error</code>, for four distinct types of normal output from
interactive commands.
</p>
</dd>
<dt class="hdlist1">
color.pager
</dt>
<dd>
<p>
A boolean to enable/disable colored output when the pager is in
use (default is true).
</p>
</dd>
<dt class="hdlist1">
color.showBranch
</dt>
<dd>
<p>
A boolean to enable/disable color in the output of
<a href="git-show-branch.html">git-show-branch(1)</a>. May be set to <code>always</code>,
<code>false</code> (or <code>never</code>) or <code>auto</code> (or <code>true</code>), in which case colors are used
only when the output is to a terminal. If unset, then the
value of <code>color.ui</code> is used (<code>auto</code> by default).
</p>
</dd>
<dt class="hdlist1">
color.status
</dt>
<dd>
<p>
A boolean to enable/disable color in the output of
<a href="git-status.html">git-status(1)</a>. May be set to <code>always</code>,
<code>false</code> (or <code>never</code>) or <code>auto</code> (or <code>true</code>), in which case colors are used
only when the output is to a terminal. If unset, then the
value of <code>color.ui</code> is used (<code>auto</code> by default).
</p>
</dd>
<dt class="hdlist1">
color.status.&lt;slot&gt;
</dt>
<dd>
<p>
Use customized color for status colorization. <code>&lt;slot&gt;</code> is
one of <code>header</code> (the header text of the status message),
<code>added</code> or <code>updated</code> (files which are added but not committed),
<code>changed</code> (files which are changed but not added in the index),
<code>untracked</code> (files which are not tracked by Git),
<code>branch</code> (the current branch),
<code>nobranch</code> (the color the <em>no branch</em> warning is shown in, defaulting
to red),
<code>localBranch</code> or <code>remoteBranch</code> (the local and remote branch names,
respectively, when branch and tracking information is displayed in the
status short-format), or
<code>unmerged</code> (files which have unmerged changes).
</p>
</dd>
<dt class="hdlist1">
color.ui
</dt>
<dd>
<p>
This variable determines the default value for variables such
as <code>color.diff</code> and <code>color.grep</code> that control the use of color
per command family. Its scope will expand as more commands learn
configuration to set a default for the <code>--color</code> option. Set it
to <code>false</code> or <code>never</code> if you prefer Git commands not to use
color unless enabled explicitly with some other configuration
or the <code>--color</code> option. Set it to <code>always</code> if you want all
output not intended for machine consumption to use color, to
<code>true</code> or <code>auto</code> (this is the default since Git 1.8.4) if you
want such output to use color when written to the terminal.
</p>
</dd>
<dt class="hdlist1">
column.ui
</dt>
<dd>
<p>
Specify whether supported commands should output in columns.
This variable consists of a list of tokens separated by spaces
or commas:
</p>
<div class="paragraph"><p>These options control when the feature should be enabled
(defaults to <em>never</em>):</p></div>
<div class="openblock">
<div class="content">
<div class="dlist"><dl>
<dt class="hdlist1">
<code>always</code>
</dt>
<dd>
<p>
always show in columns
</p>
</dd>
<dt class="hdlist1">
<code>never</code>
</dt>
<dd>
<p>
never show in columns
</p>
</dd>
<dt class="hdlist1">
<code>auto</code>
</dt>
<dd>
<p>
show in columns if the output is to the terminal
</p>
</dd>
</dl></div>
</div></div>
<div class="paragraph"><p>These options control layout (defaults to <em>column</em>). Setting any
of these implies <em>always</em> if none of <em>always</em>, <em>never</em>, or <em>auto</em> are
specified.</p></div>
<div class="openblock">
<div class="content">
<div class="dlist"><dl>
<dt class="hdlist1">
<code>column</code>
</dt>
<dd>
<p>
fill columns before rows
</p>
</dd>
<dt class="hdlist1">
<code>row</code>
</dt>
<dd>
<p>
fill rows before columns
</p>
</dd>
<dt class="hdlist1">
<code>plain</code>
</dt>
<dd>
<p>
show in one column
</p>
</dd>
</dl></div>
</div></div>
<div class="paragraph"><p>Finally, these options can be combined with a layout option (defaults
to <em>nodense</em>):</p></div>
<div class="openblock">
<div class="content">
<div class="dlist"><dl>
<dt class="hdlist1">
<code>dense</code>
</dt>
<dd>
<p>
make unequal size columns to utilize more space
</p>
</dd>
<dt class="hdlist1">
<code>nodense</code>
</dt>
<dd>
<p>
make equal size columns
</p>
</dd>
</dl></div>
</div></div>
</dd>
<dt class="hdlist1">
column.branch
</dt>
<dd>
<p>
Specify whether to output branch listing in <code>git branch</code> in columns.
See <code>column.ui</code> for details.
</p>
</dd>
<dt class="hdlist1">
column.clean
</dt>
<dd>
<p>
Specify the layout when list items in <code>git clean -i</code>, which always
shows files and directories in columns. See <code>column.ui</code> for details.
</p>
</dd>
<dt class="hdlist1">
column.status
</dt>
<dd>
<p>
Specify whether to output untracked files in <code>git status</code> in columns.
See <code>column.ui</code> for details.
</p>
</dd>
<dt class="hdlist1">
column.tag
</dt>
<dd>
<p>
Specify whether to output tag listing in <code>git tag</code> in columns.
See <code>column.ui</code> for details.
</p>
</dd>
<dt class="hdlist1">
commit.cleanup
</dt>
<dd>
<p>
This setting overrides the default of the <code>--cleanup</code> option in
<code>git commit</code>. See <a href="git-commit.html">git-commit(1)</a> for details. Changing the
default can be useful when you always want to keep lines that begin
with comment character <code>#</code> in your log message, in which case you
would do <code>git config commit.cleanup whitespace</code> (note that you will
have to remove the help lines that begin with <code>#</code> in the commit log
template yourself, if you do this).
</p>
</dd>
<dt class="hdlist1">
commit.gpgSign
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
commit.status
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
commit.template
</dt>
<dd>
<p>
Specify the pathname of a file to use as the template for
new commit messages.
</p>
</dd>
<dt class="hdlist1">
commit.verbose
</dt>
<dd>
<p>
A boolean or int to specify the level of verbose with <code>git commit</code>.
See <a href="git-commit.html">git-commit(1)</a>.
</p>
</dd>
<dt class="hdlist1">
credential.helper
</dt>
<dd>
<p>
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 <a href="gitcredentials.html">gitcredentials(7)</a>
for details.
</p>
</dd>
<dt class="hdlist1">
credential.useHttpPath
</dt>
<dd>
<p>
When acquiring credentials, consider the "path" component of an http
or https URL to be important. Defaults to false. See
<a href="gitcredentials.html">gitcredentials(7)</a> for more information.
</p>
</dd>
<dt class="hdlist1">
credential.username
</dt>
<dd>
<p>
If no username is set for a network authentication, use this username
by default. See credential.&lt;context&gt;.* below, and
<a href="gitcredentials.html">gitcredentials(7)</a>.
</p>
</dd>
<dt class="hdlist1">
credential.&lt;url&gt;.*
</dt>
<dd>
<p>
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 <a href="gitcredentials.html">gitcredentials(7)</a> for details on how URLs are
matched.
</p>
</dd>
<dt class="hdlist1">
credentialCache.ignoreSIGHUP
</dt>
<dd>
<p>
Tell git-credential-cache&#8212;daemon to ignore SIGHUP, instead of quitting.
</p>
</dd>
<dt class="hdlist1">
diff.autoRefreshIndex
</dt>
<dd>
<p>
When using <em>git diff</em> to compare with work tree
files, do not consider stat-only change as changed.
Instead, silently run <code>git update-index --refresh</code> 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 <em>git diff</em> Porcelain, and not lower level
<em>diff</em> commands such as <em>git diff-files</em>.
</p>
</dd>
<dt class="hdlist1">
diff.dirstat
</dt>
<dd>
<p>
A comma separated list of <code>--dirstat</code> parameters specifying the
default behavior of the <code>--dirstat</code> option to <a href="git-diff.html">git-diff(1)</a>`
and friends. The defaults can be overridden on the command line
(using <code>--dirstat=&lt;param1,param2,...&gt;</code>). The fallback defaults
(when not changed by <code>diff.dirstat</code>) are <code>changes,noncumulative,3</code>.
The following parameters are available:
</p>
<div class="openblock">
<div class="content">
<div class="dlist"><dl>
<dt class="hdlist1">
<code>changes</code>
</dt>
<dd>
<p>
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.
</p>
</dd>
<dt class="hdlist1">
<code>lines</code>
</dt>
<dd>
<p>
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 <code>--dirstat</code>
behavior than the <code>changes</code> 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 <code>--*stat</code> options.
</p>
</dd>
<dt class="hdlist1">
<code>files</code>
</dt>
<dd>
<p>
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 <code>--dirstat</code> behavior, since it does
not have to look at the file contents at all.
</p>
</dd>
<dt class="hdlist1">
<code>cumulative</code>
</dt>
<dd>
<p>
Count changes in a child directory for the parent directory as well.
Note that when using <code>cumulative</code>, the sum of the percentages
reported may exceed 100%. The default (non-cumulative) behavior can
be specified with the <code>noncumulative</code> parameter.
</p>
</dd>
<dt class="hdlist1">
&lt;limit&gt;
</dt>
<dd>
<p>
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.
</p>
</dd>
</dl></div>
</div></div>
<div class="paragraph"><p>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:
<code>files,10,cumulative</code>.</p></div>
</dd>
<dt class="hdlist1">
diff.statGraphWidth
</dt>
<dd>
<p>
Limit the width of the graph part in --stat output. If set, applies
to all commands generating --stat output except format-patch.
</p>
</dd>
<dt class="hdlist1">
diff.context
</dt>
<dd>
<p>
Generate diffs with &lt;n&gt; lines of context instead of the default
of 3. This value is overridden by the -U option.
</p>
</dd>
<dt class="hdlist1">
diff.interHunkContext
</dt>
<dd>
<p>
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 <code>--inter-hunk-context</code>
command line option.
</p>
</dd>
<dt class="hdlist1">
diff.external
</dt>
<dd>
<p>
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 &#8216;GIT_EXTERNAL_DIFF&#8217;
environment variable. The command is called with parameters
as described under "git Diffs" in <a href="git.html">git(1)</a>. Note: if
you want to use an external diff program only on a subset of
your files, you might want to use <a href="gitattributes.html">gitattributes(5)</a> instead.
</p>
</dd>
<dt class="hdlist1">
diff.ignoreSubmodules
</dt>
<dd>
<p>
Sets the default value of --ignore-submodules. Note that this
affects only <em>git diff</em> Porcelain, and not lower level <em>diff</em>
commands such as <em>git diff-files</em>. <em>git checkout</em> also honors
this setting when reporting uncommitted changes. Setting it to
<em>all</em> disables the submodule summary normally shown by <em>git commit</em>
and <em>git status</em> when <code>status.submoduleSummary</code> is set unless it is
overridden by using the --ignore-submodules command-line option.
The <em>git submodule</em> commands are not affected by this setting.
</p>
</dd>
<dt class="hdlist1">
diff.mnemonicPrefix
</dt>
<dd>
<p>
If set, <em>git diff</em> 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:
</p>
<div class="dlist"><dl>
<dt class="hdlist1">
<code>git diff</code>
</dt>
<dd>
<p>
compares the (i)ndex and the (w)ork tree;
</p>
</dd>
<dt class="hdlist1">
<code>git diff HEAD</code>
</dt>
<dd>
<p>
compares a (c)ommit and the (w)ork tree;