Autogenerated HTML docs for v2.45.2-659-gdaed0
[git-htmldocs.git] / git.html
blob5de610ea24bfcb8c1e0d293587654228a11539a2
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
7 <meta name="generator" content="AsciiDoc 10.2.0" />
8 <title>git(1)</title>
9 <style type="text/css">
10 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
12 /* Default font. */
13 body {
14 font-family: Georgia,serif;
17 /* Title font. */
18 h1, h2, h3, h4, h5, h6,
19 div.title, caption.title,
20 thead, p.table.header,
21 #toctitle,
22 #author, #revnumber, #revdate, #revremark,
23 #footer {
24 font-family: Arial,Helvetica,sans-serif;
27 body {
28 margin: 1em 5% 1em 5%;
31 a {
32 color: blue;
33 text-decoration: underline;
35 a:visited {
36 color: fuchsia;
39 em {
40 font-style: italic;
41 color: navy;
44 strong {
45 font-weight: bold;
46 color: #083194;
49 h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
51 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
56 h1, h2, h3 {
57 border-bottom: 2px solid silver;
59 h2 {
60 padding-top: 0.5em;
62 h3 {
63 float: left;
65 h3 + * {
66 clear: left;
68 h5 {
69 font-size: 1.0em;
72 div.sectionbody {
73 margin-left: 0;
76 hr {
77 border: 1px solid silver;
80 p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
85 ul, ol, li > p {
86 margin-top: 0;
88 ul > li { color: #aaa; }
89 ul > li > * { color: black; }
91 .monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
95 padding: 0;
96 margin: 0;
98 pre {
99 white-space: pre-wrap;
102 #author {
103 color: #527bbd;
104 font-weight: bold;
105 font-size: 1.1em;
107 #email {
109 #revnumber, #revdate, #revremark {
112 #footer {
113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
118 #footer-text {
119 float: left;
120 padding-bottom: 0.5em;
122 #footer-badges {
123 float: right;
124 padding-bottom: 0.5em;
127 #preamble {
128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
131 div.imageblock, div.exampleblock, div.verseblock,
132 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133 div.admonitionblock {
134 margin-top: 1.0em;
135 margin-bottom: 1.5em;
137 div.admonitionblock {
138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
144 div.content { /* Block element content. */
145 padding: 0;
148 /* Block element titles. */
149 div.title, caption.title {
150 color: #527bbd;
151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
156 div.title + * {
157 margin-top: 0;
160 td div.title:first-child {
161 margin-top: 0.0em;
163 div.content div.title:first-child {
164 margin-top: 0.0em;
166 div.content + div.title {
167 margin-top: 0.0em;
170 div.sidebarblock > div.content {
171 background: #ffffee;
172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
174 padding: 0.5em;
177 div.listingblock > div.content {
178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
181 padding: 0.5em;
184 div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
187 margin-right: 10%;
188 border-left: 5px solid #f0f0f0;
189 color: #888;
192 div.quoteblock > div.attribution {
193 padding-top: 0.5em;
194 text-align: right;
197 div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
201 div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
205 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
206 div.verseblock + div.attribution {
207 text-align: left;
210 div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
218 div.admonitionblock td.content {
219 padding-left: 0.5em;
220 border-left: 3px solid #dddddd;
223 div.exampleblock > div.content {
224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
228 div.imageblock div.content { padding-left: 0; }
229 span.image img { border-style: none; vertical-align: text-bottom; }
230 a.image:visited { color: white; }
232 dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
236 dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
239 font-style: normal;
240 color: navy;
242 dd > *:first-child {
243 margin-top: 0.1em;
246 ul, ol {
247 list-style-position: outside;
249 ol.arabic {
250 list-style-type: decimal;
252 ol.loweralpha {
253 list-style-type: lower-alpha;
255 ol.upperalpha {
256 list-style-type: upper-alpha;
258 ol.lowerroman {
259 list-style-type: lower-roman;
261 ol.upperroman {
262 list-style-type: upper-roman;
265 div.compact ul, div.compact ol,
266 div.compact p, div.compact p,
267 div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
272 tfoot {
273 font-weight: bold;
275 td > div.verse {
276 white-space: pre;
279 div.hdlist {
280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
283 div.hdlist tr {
284 padding-bottom: 15px;
286 dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
289 td.hdlist1 {
290 vertical-align: top;
291 font-style: normal;
292 padding-right: 0.8em;
293 color: navy;
295 td.hdlist2 {
296 vertical-align: top;
298 div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
303 .comment {
304 background: yellow;
307 .footnote, .footnoteref {
308 font-size: 0.8em;
311 span.footnote, span.footnoteref {
312 vertical-align: super;
315 #footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
320 #footnotes div.footnote {
321 margin: 0 0 5px 0;
324 #footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
334 div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
339 div.colist td img {
340 margin-top: 0.3em;
343 @media print {
344 #footer-badges { display: none; }
347 #toc {
348 margin-bottom: 2.5em;
351 #toctitle {
352 color: #527bbd;
353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
359 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
360 margin-top: 0;
361 margin-bottom: 0;
363 div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
367 div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
371 div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
376 span.aqua { color: aqua; }
377 span.black { color: black; }
378 span.blue { color: blue; }
379 span.fuchsia { color: fuchsia; }
380 span.gray { color: gray; }
381 span.green { color: green; }
382 span.lime { color: lime; }
383 span.maroon { color: maroon; }
384 span.navy { color: navy; }
385 span.olive { color: olive; }
386 span.purple { color: purple; }
387 span.red { color: red; }
388 span.silver { color: silver; }
389 span.teal { color: teal; }
390 span.white { color: white; }
391 span.yellow { color: yellow; }
393 span.aqua-background { background: aqua; }
394 span.black-background { background: black; }
395 span.blue-background { background: blue; }
396 span.fuchsia-background { background: fuchsia; }
397 span.gray-background { background: gray; }
398 span.green-background { background: green; }
399 span.lime-background { background: lime; }
400 span.maroon-background { background: maroon; }
401 span.navy-background { background: navy; }
402 span.olive-background { background: olive; }
403 span.purple-background { background: purple; }
404 span.red-background { background: red; }
405 span.silver-background { background: silver; }
406 span.teal-background { background: teal; }
407 span.white-background { background: white; }
408 span.yellow-background { background: yellow; }
410 span.big { font-size: 2em; }
411 span.small { font-size: 0.6em; }
413 span.underline { text-decoration: underline; }
414 span.overline { text-decoration: overline; }
415 span.line-through { text-decoration: line-through; }
417 div.unbreakable { page-break-inside: avoid; }
421 * xhtml11 specific
423 * */
425 div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
429 div.tableblock > table {
430 border: 3px solid #527bbd;
432 thead, p.table.header {
433 font-weight: bold;
434 color: #527bbd;
436 p.table {
437 margin-top: 0;
439 /* Because the table frame attribute is overridden by CSS in most browsers. */
440 div.tableblock > table[frame="void"] {
441 border-style: none;
443 div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
447 div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
454 * html5 specific
456 * */
458 table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
462 thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
466 p.tableblock {
467 margin-top: 0;
469 table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
476 th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
483 table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
487 table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
491 table.tableblock.frame-none {
492 border-style: hidden;
495 th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
498 th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
501 th.tableblock.halign-right, td.tableblock.halign-right {
502 text-align: right;
505 th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
508 th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
511 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
517 * manpage specific
519 * */
521 body.manpage h1 {
522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
527 body.manpage h2 {
528 border-style: none;
530 body.manpage div.sectionbody {
531 margin-left: 3em;
534 @media print {
535 body.manpage div#toc { display: none; }
539 </style>
540 <script type="text/javascript">
541 /*<![CDATA[*/
542 var asciidoc = { // Namespace.
544 /////////////////////////////////////////////////////////////////////
545 // Table Of Contents generator
546 /////////////////////////////////////////////////////////////////////
548 /* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
551 * Table Of Content generator
552 * Version: 0.4
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
561 // toclevels = 1..4.
562 toc: function (toclevels) {
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
572 return text;
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
581 function tocEntries(el, toclevels) {
582 var result = new Array;
583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
594 iterate(i);
598 iterate(el);
599 return result;
602 var toc = document.getElementById("toc");
603 if (!toc) {
604 return;
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
612 if (entry.nodeName.toLowerCase() == 'div'
613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
621 // Rebuild TOC entries.
622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
640 /////////////////////////////////////////////////////////////////////
641 // Footnotes generator
642 /////////////////////////////////////////////////////////////////////
644 /* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
648 footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
651 var noteholder = document.getElementById("footnotes");
652 if (!noteholder) {
653 return;
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
659 entriesToRemove.push(entry);
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
708 install: function(toclevels) {
709 var timerId;
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
731 asciidoc.install();
732 /*]]>*/
733 </script>
734 </head>
735 <body class="manpage">
736 <div id="header">
737 <h1>
738 git(1) Manual Page
739 </h1>
740 <h2>NAME</h2>
741 <div class="sectionbody">
742 <p>git -
743 the stupid content tracker
744 </p>
745 </div>
746 </div>
747 <div id="content">
748 <div class="sect1">
749 <h2 id="_synopsis">SYNOPSIS</h2>
750 <div class="sectionbody">
751 <div class="verseblock">
752 <pre class="content"><em>git</em> [-v | --version] [-h | --help] [-C &lt;path&gt;] [-c &lt;name&gt;=&lt;value&gt;]
753 [--exec-path[=&lt;path&gt;]] [--html-path] [--man-path] [--info-path]
754 [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch]
755 [--no-optional-locks] [--no-advice] [--bare] [--git-dir=&lt;path&gt;]
756 [--work-tree=&lt;path&gt;] [--namespace=&lt;name&gt;] [--config-env=&lt;name&gt;=&lt;envvar&gt;]
757 &lt;command&gt; [&lt;args&gt;]</pre>
758 <div class="attribution">
759 </div></div>
760 </div>
761 </div>
762 <div class="sect1">
763 <h2 id="_description">DESCRIPTION</h2>
764 <div class="sectionbody">
765 <div class="paragraph"><p>Git is a fast, scalable, distributed revision control system with an
766 unusually rich command set that provides both high-level operations
767 and full access to internals.</p></div>
768 <div class="paragraph"><p>See <a href="gittutorial.html">gittutorial(7)</a> to get started, then see
769 <a href="giteveryday.html">giteveryday(7)</a> for a useful minimum set of
770 commands. The <a href="user-manual.html">Git User&#8217;s Manual</a> has a more
771 in-depth introduction.</p></div>
772 <div class="paragraph"><p>After you mastered the basic concepts, you can come back to this
773 page to learn what commands Git offers. You can learn more about
774 individual Git commands with "git help command". <a href="gitcli.html">gitcli(7)</a>
775 manual page gives you an overview of the command-line command syntax.</p></div>
776 <div class="paragraph"><p>A formatted and hyperlinked copy of the latest Git documentation
777 can be viewed at <a href="https://git.github.io/htmldocs/git.html">https://git.github.io/htmldocs/git.html</a>
778 or <a href="https://git-scm.com/docs">https://git-scm.com/docs</a>.</p></div>
779 </div>
780 </div>
781 <div class="sect1">
782 <h2 id="_options">OPTIONS</h2>
783 <div class="sectionbody">
784 <div class="dlist"><dl>
785 <dt class="hdlist1">
787 </dt>
788 <dt class="hdlist1">
789 --version
790 </dt>
791 <dd>
793 Prints the Git suite version that the <em>git</em> program came from.
794 </p>
795 <div class="paragraph"><p>This option is internally converted to <code>git version ...</code> and accepts
796 the same options as the <a href="git-version.html">git-version(1)</a> command. If <code>--help</code> is
797 also given, it takes precedence over <code>--version</code>.</p></div>
798 </dd>
799 <dt class="hdlist1">
801 </dt>
802 <dt class="hdlist1">
803 --help
804 </dt>
805 <dd>
807 Prints the synopsis and a list of the most commonly used
808 commands. If the option <code>--all</code> or <code>-a</code> is given then all
809 available commands are printed. If a Git command is named this
810 option will bring up the manual page for that command.
811 </p>
812 <div class="paragraph"><p>Other options are available to control how the manual page is
813 displayed. See <a href="git-help.html">git-help(1)</a> for more information,
814 because <code>git --help ...</code> is converted internally into <code>git
815 help ...</code>.</p></div>
816 </dd>
817 <dt class="hdlist1">
818 -C &lt;path&gt;
819 </dt>
820 <dd>
822 Run as if git was started in <em>&lt;path&gt;</em> instead of the current working
823 directory. When multiple <code>-C</code> options are given, each subsequent
824 non-absolute <code>-C &lt;path&gt;</code> is interpreted relative to the preceding <code>-C
825 &lt;path&gt;</code>. If <em>&lt;path&gt;</em> is present but empty, e.g. <code>-C ""</code>, then the
826 current working directory is left unchanged.
827 </p>
828 <div class="paragraph"><p>This option affects options that expect path name like <code>--git-dir</code> and
829 <code>--work-tree</code> in that their interpretations of the path names would be
830 made relative to the working directory caused by the <code>-C</code> option. For
831 example the following invocations are equivalent:</p></div>
832 <div class="literalblock">
833 <div class="content">
834 <pre><code>git --git-dir=a.git --work-tree=b -C c status
835 git --git-dir=c/a.git --work-tree=c/b status</code></pre>
836 </div></div>
837 </dd>
838 <dt class="hdlist1">
839 -c &lt;name&gt;=&lt;value&gt;
840 </dt>
841 <dd>
843 Pass a configuration parameter to the command. The value
844 given will override values from configuration files.
845 The &lt;name&gt; is expected in the same format as listed by
846 <em>git config</em> (subkeys separated by dots).
847 </p>
848 <div class="paragraph"><p>Note that omitting the <code>=</code> in <code>git -c foo.bar ...</code> is allowed and sets
849 <code>foo.bar</code> to the boolean true value (just like <code>[foo]bar</code> would in a
850 config file). Including the equals but with an empty value (like <code>git -c
851 foo.bar= ...</code>) sets <code>foo.bar</code> to the empty string which <code>git config
852 --type=bool</code> will convert to <code>false</code>.</p></div>
853 </dd>
854 <dt class="hdlist1">
855 --config-env=&lt;name&gt;=&lt;envvar&gt;
856 </dt>
857 <dd>
859 Like <code>-c &lt;name&gt;=&lt;value&gt;</code>, give configuration variable
860 <em>&lt;name&gt;</em> a value, where &lt;envvar&gt; is the name of an
861 environment variable from which to retrieve the value. Unlike
862 <code>-c</code> there is no shortcut for directly setting the value to an
863 empty string, instead the environment variable itself must be
864 set to the empty string. It is an error if the <code>&lt;envvar&gt;</code> does not exist
865 in the environment. <code>&lt;envvar&gt;</code> may not contain an equals sign
866 to avoid ambiguity with <code>&lt;name&gt;</code> containing one.
867 </p>
868 <div class="paragraph"><p>This is useful for cases where you want to pass transitory
869 configuration options to git, but are doing so on operating systems
870 where other processes might be able to read your command line
871 (e.g. <code>/proc/self/cmdline</code>), but not your environment
872 (e.g. <code>/proc/self/environ</code>). That behavior is the default on
873 Linux, but may not be on your system.</p></div>
874 <div class="paragraph"><p>Note that this might add security for variables such as
875 <code>http.extraHeader</code> where the sensitive information is part of
876 the value, but not e.g. <code>url.&lt;base&gt;.insteadOf</code> where the
877 sensitive information can be part of the key.</p></div>
878 </dd>
879 <dt class="hdlist1">
880 --exec-path[=&lt;path&gt;]
881 </dt>
882 <dd>
884 Path to wherever your core Git programs are installed.
885 This can also be controlled by setting the GIT_EXEC_PATH
886 environment variable. If no path is given, <em>git</em> will print
887 the current setting and then exit.
888 </p>
889 </dd>
890 <dt class="hdlist1">
891 --html-path
892 </dt>
893 <dd>
895 Print the path, without trailing slash, where Git&#8217;s HTML
896 documentation is installed and exit.
897 </p>
898 </dd>
899 <dt class="hdlist1">
900 --man-path
901 </dt>
902 <dd>
904 Print the manpath (see <code>man(1)</code>) for the man pages for
905 this version of Git and exit.
906 </p>
907 </dd>
908 <dt class="hdlist1">
909 --info-path
910 </dt>
911 <dd>
913 Print the path where the Info files documenting this
914 version of Git are installed and exit.
915 </p>
916 </dd>
917 <dt class="hdlist1">
919 </dt>
920 <dt class="hdlist1">
921 --paginate
922 </dt>
923 <dd>
925 Pipe all output into <em>less</em> (or if set, $PAGER) if standard
926 output is a terminal. This overrides the <code>pager.&lt;cmd&gt;</code>
927 configuration options (see the "Configuration Mechanism" section
928 below).
929 </p>
930 </dd>
931 <dt class="hdlist1">
933 </dt>
934 <dt class="hdlist1">
935 --no-pager
936 </dt>
937 <dd>
939 Do not pipe Git output into a pager.
940 </p>
941 </dd>
942 <dt class="hdlist1">
943 --git-dir=&lt;path&gt;
944 </dt>
945 <dd>
947 Set the path to the repository (".git" directory). This can also be
948 controlled by setting the <code>GIT_DIR</code> environment variable. It can be
949 an absolute path or relative path to current working directory.
950 </p>
951 <div class="paragraph"><p>Specifying the location of the ".git" directory using this
952 option (or <code>GIT_DIR</code> environment variable) turns off the
953 repository discovery that tries to find a directory with
954 ".git" subdirectory (which is how the repository and the
955 top-level of the working tree are discovered), and tells Git
956 that you are at the top level of the working tree. If you
957 are not at the top-level directory of the working tree, you
958 should tell Git where the top-level of the working tree is,
959 with the <code>--work-tree=&lt;path&gt;</code> option (or <code>GIT_WORK_TREE</code>
960 environment variable)</p></div>
961 <div class="paragraph"><p>If you just want to run git as if it was started in <code>&lt;path&gt;</code> then use
962 <code>git -C &lt;path&gt;</code>.</p></div>
963 </dd>
964 <dt class="hdlist1">
965 --work-tree=&lt;path&gt;
966 </dt>
967 <dd>
969 Set the path to the working tree. It can be an absolute path
970 or a path relative to the current working directory.
971 This can also be controlled by setting the GIT_WORK_TREE
972 environment variable and the core.worktree configuration
973 variable (see core.worktree in <a href="git-config.html">git-config(1)</a> for a
974 more detailed discussion).
975 </p>
976 </dd>
977 <dt class="hdlist1">
978 --namespace=&lt;path&gt;
979 </dt>
980 <dd>
982 Set the Git namespace. See <a href="gitnamespaces.html">gitnamespaces(7)</a> for more
983 details. Equivalent to setting the <code>GIT_NAMESPACE</code> environment
984 variable.
985 </p>
986 </dd>
987 <dt class="hdlist1">
988 --bare
989 </dt>
990 <dd>
992 Treat the repository as a bare repository. If GIT_DIR
993 environment is not set, it is set to the current working
994 directory.
995 </p>
996 </dd>
997 <dt class="hdlist1">
998 --no-replace-objects
999 </dt>
1000 <dd>
1002 Do not use replacement refs to replace Git objects.
1003 This is equivalent to exporting the <code>GIT_NO_REPLACE_OBJECTS</code>
1004 environment variable with any value.
1005 See <a href="git-replace.html">git-replace(1)</a> for more information.
1006 </p>
1007 </dd>
1008 <dt class="hdlist1">
1009 --no-lazy-fetch
1010 </dt>
1011 <dd>
1013 Do not fetch missing objects from the promisor remote on
1014 demand. Useful together with <code>git cat-file -e &lt;object&gt;</code> to
1015 see if the object is locally available.
1016 This is equivalent to setting the <code>GIT_NO_LAZY_FETCH</code>
1017 environment variable to <code>1</code>.
1018 </p>
1019 </dd>
1020 <dt class="hdlist1">
1021 --no-optional-locks
1022 </dt>
1023 <dd>
1025 Do not perform optional operations that require locks. This is
1026 equivalent to setting the <code>GIT_OPTIONAL_LOCKS</code> to <code>0</code>.
1027 </p>
1028 </dd>
1029 <dt class="hdlist1">
1030 --no-advice
1031 </dt>
1032 <dd>
1034 Disable all advice hints from being printed.
1035 </p>
1036 </dd>
1037 <dt class="hdlist1">
1038 --literal-pathspecs
1039 </dt>
1040 <dd>
1042 Treat pathspecs literally (i.e. no globbing, no pathspec magic).
1043 This is equivalent to setting the <code>GIT_LITERAL_PATHSPECS</code> environment
1044 variable to <code>1</code>.
1045 </p>
1046 </dd>
1047 <dt class="hdlist1">
1048 --glob-pathspecs
1049 </dt>
1050 <dd>
1052 Add "glob" magic to all pathspec. This is equivalent to setting
1053 the <code>GIT_GLOB_PATHSPECS</code> environment variable to <code>1</code>. Disabling
1054 globbing on individual pathspecs can be done using pathspec
1055 magic ":(literal)"
1056 </p>
1057 </dd>
1058 <dt class="hdlist1">
1059 --noglob-pathspecs
1060 </dt>
1061 <dd>
1063 Add "literal" magic to all pathspec. This is equivalent to setting
1064 the <code>GIT_NOGLOB_PATHSPECS</code> environment variable to <code>1</code>. Enabling
1065 globbing on individual pathspecs can be done using pathspec
1066 magic ":(glob)"
1067 </p>
1068 </dd>
1069 <dt class="hdlist1">
1070 --icase-pathspecs
1071 </dt>
1072 <dd>
1074 Add "icase" magic to all pathspec. This is equivalent to setting
1075 the <code>GIT_ICASE_PATHSPECS</code> environment variable to <code>1</code>.
1076 </p>
1077 </dd>
1078 <dt class="hdlist1">
1079 --list-cmds=&lt;group&gt;[,&lt;group&gt;&#8230;]
1080 </dt>
1081 <dd>
1083 List commands by group. This is an internal/experimental
1084 option and may change or be removed in the future. Supported
1085 groups are: builtins, parseopt (builtin commands that use
1086 parse-options), main (all commands in libexec directory),
1087 others (all other commands in <code>$PATH</code> that have git- prefix),
1088 list-&lt;category&gt; (see categories in command-list.txt),
1089 nohelpers (exclude helper commands), alias and config
1090 (retrieve command list from config variable completion.commands)
1091 </p>
1092 </dd>
1093 <dt class="hdlist1">
1094 --attr-source=&lt;tree-ish&gt;
1095 </dt>
1096 <dd>
1098 Read gitattributes from &lt;tree-ish&gt; instead of the worktree. See
1099 <a href="gitattributes.html">gitattributes(5)</a>. This is equivalent to setting the
1100 <code>GIT_ATTR_SOURCE</code> environment variable.
1101 </p>
1102 </dd>
1103 </dl></div>
1104 </div>
1105 </div>
1106 <div class="sect1">
1107 <h2 id="_git_commands">GIT COMMANDS</h2>
1108 <div class="sectionbody">
1109 <div class="paragraph"><p>We divide Git into high level ("porcelain") commands and low level
1110 ("plumbing") commands.</p></div>
1111 </div>
1112 </div>
1113 <div class="sect1">
1114 <h2 id="_high_level_commands_porcelain">High-level commands (porcelain)</h2>
1115 <div class="sectionbody">
1116 <div class="paragraph"><p>We separate the porcelain commands into the main commands and some
1117 ancillary user utilities.</p></div>
1118 <div class="sect2">
1119 <h3 id="_main_porcelain_commands">Main porcelain commands</h3>
1120 <div class="dlist"><dl>
1121 <dt class="hdlist1">
1122 <a href="git-add.html">git-add(1)</a>
1123 </dt>
1124 <dd>
1126 Add file contents to the index.
1127 </p>
1128 </dd>
1129 <dt class="hdlist1">
1130 <a href="git-am.html">git-am(1)</a>
1131 </dt>
1132 <dd>
1134 Apply a series of patches from a mailbox.
1135 </p>
1136 </dd>
1137 <dt class="hdlist1">
1138 <a href="git-archive.html">git-archive(1)</a>
1139 </dt>
1140 <dd>
1142 Create an archive of files from a named tree.
1143 </p>
1144 </dd>
1145 <dt class="hdlist1">
1146 <a href="git-bisect.html">git-bisect(1)</a>
1147 </dt>
1148 <dd>
1150 Use binary search to find the commit that introduced a bug.
1151 </p>
1152 </dd>
1153 <dt class="hdlist1">
1154 <a href="git-branch.html">git-branch(1)</a>
1155 </dt>
1156 <dd>
1158 List, create, or delete branches.
1159 </p>
1160 </dd>
1161 <dt class="hdlist1">
1162 <a href="git-bundle.html">git-bundle(1)</a>
1163 </dt>
1164 <dd>
1166 Move objects and refs by archive.
1167 </p>
1168 </dd>
1169 <dt class="hdlist1">
1170 <a href="git-checkout.html">git-checkout(1)</a>
1171 </dt>
1172 <dd>
1174 Switch branches or restore working tree files.
1175 </p>
1176 </dd>
1177 <dt class="hdlist1">
1178 <a href="git-cherry-pick.html">git-cherry-pick(1)</a>
1179 </dt>
1180 <dd>
1182 Apply the changes introduced by some existing commits.
1183 </p>
1184 </dd>
1185 <dt class="hdlist1">
1186 <a href="git-citool.html">git-citool(1)</a>
1187 </dt>
1188 <dd>
1190 Graphical alternative to git-commit.
1191 </p>
1192 </dd>
1193 <dt class="hdlist1">
1194 <a href="git-clean.html">git-clean(1)</a>
1195 </dt>
1196 <dd>
1198 Remove untracked files from the working tree.
1199 </p>
1200 </dd>
1201 <dt class="hdlist1">
1202 <a href="git-clone.html">git-clone(1)</a>
1203 </dt>
1204 <dd>
1206 Clone a repository into a new directory.
1207 </p>
1208 </dd>
1209 <dt class="hdlist1">
1210 <a href="git-commit.html">git-commit(1)</a>
1211 </dt>
1212 <dd>
1214 Record changes to the repository.
1215 </p>
1216 </dd>
1217 <dt class="hdlist1">
1218 <a href="git-describe.html">git-describe(1)</a>
1219 </dt>
1220 <dd>
1222 Give an object a human readable name based on an available ref.
1223 </p>
1224 </dd>
1225 <dt class="hdlist1">
1226 <a href="git-diff.html">git-diff(1)</a>
1227 </dt>
1228 <dd>
1230 Show changes between commits, commit and working tree, etc.
1231 </p>
1232 </dd>
1233 <dt class="hdlist1">
1234 <a href="git-fetch.html">git-fetch(1)</a>
1235 </dt>
1236 <dd>
1238 Download objects and refs from another repository.
1239 </p>
1240 </dd>
1241 <dt class="hdlist1">
1242 <a href="git-format-patch.html">git-format-patch(1)</a>
1243 </dt>
1244 <dd>
1246 Prepare patches for e-mail submission.
1247 </p>
1248 </dd>
1249 <dt class="hdlist1">
1250 <a href="git-gc.html">git-gc(1)</a>
1251 </dt>
1252 <dd>
1254 Cleanup unnecessary files and optimize the local repository.
1255 </p>
1256 </dd>
1257 <dt class="hdlist1">
1258 <a href="git-grep.html">git-grep(1)</a>
1259 </dt>
1260 <dd>
1262 Print lines matching a pattern.
1263 </p>
1264 </dd>
1265 <dt class="hdlist1">
1266 <a href="git-gui.html">git-gui(1)</a>
1267 </dt>
1268 <dd>
1270 A portable graphical interface to Git.
1271 </p>
1272 </dd>
1273 <dt class="hdlist1">
1274 <a href="git-init.html">git-init(1)</a>
1275 </dt>
1276 <dd>
1278 Create an empty Git repository or reinitialize an existing one.
1279 </p>
1280 </dd>
1281 <dt class="hdlist1">
1282 <a href="git-log.html">git-log(1)</a>
1283 </dt>
1284 <dd>
1286 Show commit logs.
1287 </p>
1288 </dd>
1289 <dt class="hdlist1">
1290 <a href="git-maintenance.html">git-maintenance(1)</a>
1291 </dt>
1292 <dd>
1294 Run tasks to optimize Git repository data.
1295 </p>
1296 </dd>
1297 <dt class="hdlist1">
1298 <a href="git-merge.html">git-merge(1)</a>
1299 </dt>
1300 <dd>
1302 Join two or more development histories together.
1303 </p>
1304 </dd>
1305 <dt class="hdlist1">
1306 <a href="git-mv.html">git-mv(1)</a>
1307 </dt>
1308 <dd>
1310 Move or rename a file, a directory, or a symlink.
1311 </p>
1312 </dd>
1313 <dt class="hdlist1">
1314 <a href="git-notes.html">git-notes(1)</a>
1315 </dt>
1316 <dd>
1318 Add or inspect object notes.
1319 </p>
1320 </dd>
1321 <dt class="hdlist1">
1322 <a href="git-pull.html">git-pull(1)</a>
1323 </dt>
1324 <dd>
1326 Fetch from and integrate with another repository or a local branch.
1327 </p>
1328 </dd>
1329 <dt class="hdlist1">
1330 <a href="git-push.html">git-push(1)</a>
1331 </dt>
1332 <dd>
1334 Update remote refs along with associated objects.
1335 </p>
1336 </dd>
1337 <dt class="hdlist1">
1338 <a href="git-range-diff.html">git-range-diff(1)</a>
1339 </dt>
1340 <dd>
1342 Compare two commit ranges (e.g. two versions of a branch).
1343 </p>
1344 </dd>
1345 <dt class="hdlist1">
1346 <a href="git-rebase.html">git-rebase(1)</a>
1347 </dt>
1348 <dd>
1350 Reapply commits on top of another base tip.
1351 </p>
1352 </dd>
1353 <dt class="hdlist1">
1354 <a href="git-reset.html">git-reset(1)</a>
1355 </dt>
1356 <dd>
1358 Reset current HEAD to the specified state.
1359 </p>
1360 </dd>
1361 <dt class="hdlist1">
1362 <a href="git-restore.html">git-restore(1)</a>
1363 </dt>
1364 <dd>
1366 Restore working tree files.
1367 </p>
1368 </dd>
1369 <dt class="hdlist1">
1370 <a href="git-revert.html">git-revert(1)</a>
1371 </dt>
1372 <dd>
1374 Revert some existing commits.
1375 </p>
1376 </dd>
1377 <dt class="hdlist1">
1378 <a href="git-rm.html">git-rm(1)</a>
1379 </dt>
1380 <dd>
1382 Remove files from the working tree and from the index.
1383 </p>
1384 </dd>
1385 <dt class="hdlist1">
1386 <a href="git-shortlog.html">git-shortlog(1)</a>
1387 </dt>
1388 <dd>
1390 Summarize <em>git log</em> output.
1391 </p>
1392 </dd>
1393 <dt class="hdlist1">
1394 <a href="git-show.html">git-show(1)</a>
1395 </dt>
1396 <dd>
1398 Show various types of objects.
1399 </p>
1400 </dd>
1401 <dt class="hdlist1">
1402 <a href="git-sparse-checkout.html">git-sparse-checkout(1)</a>
1403 </dt>
1404 <dd>
1406 Reduce your working tree to a subset of tracked files.
1407 </p>
1408 </dd>
1409 <dt class="hdlist1">
1410 <a href="git-stash.html">git-stash(1)</a>
1411 </dt>
1412 <dd>
1414 Stash the changes in a dirty working directory away.
1415 </p>
1416 </dd>
1417 <dt class="hdlist1">
1418 <a href="git-status.html">git-status(1)</a>
1419 </dt>
1420 <dd>
1422 Show the working tree status.
1423 </p>
1424 </dd>
1425 <dt class="hdlist1">
1426 <a href="git-submodule.html">git-submodule(1)</a>
1427 </dt>
1428 <dd>
1430 Initialize, update or inspect submodules.
1431 </p>
1432 </dd>
1433 <dt class="hdlist1">
1434 <a href="git-switch.html">git-switch(1)</a>
1435 </dt>
1436 <dd>
1438 Switch branches.
1439 </p>
1440 </dd>
1441 <dt class="hdlist1">
1442 <a href="git-tag.html">git-tag(1)</a>
1443 </dt>
1444 <dd>
1446 Create, list, delete or verify a tag object signed with GPG.
1447 </p>
1448 </dd>
1449 <dt class="hdlist1">
1450 <a href="git-worktree.html">git-worktree(1)</a>
1451 </dt>
1452 <dd>
1454 Manage multiple working trees.
1455 </p>
1456 </dd>
1457 <dt class="hdlist1">
1458 <a href="gitk.html">gitk(1)</a>
1459 </dt>
1460 <dd>
1462 The Git repository browser.
1463 </p>
1464 </dd>
1465 <dt class="hdlist1">
1466 <a href="scalar.html">scalar(1)</a>
1467 </dt>
1468 <dd>
1470 A tool for managing large Git repositories.
1471 </p>
1472 </dd>
1473 </dl></div>
1474 </div>
1475 <div class="sect2">
1476 <h3 id="_ancillary_commands">Ancillary Commands</h3>
1477 <div class="paragraph"><p>Manipulators:</p></div>
1478 <div class="dlist"><dl>
1479 <dt class="hdlist1">
1480 <a href="git-config.html">git-config(1)</a>
1481 </dt>
1482 <dd>
1484 Get and set repository or global options.
1485 </p>
1486 </dd>
1487 <dt class="hdlist1">
1488 <a href="git-fast-export.html">git-fast-export(1)</a>
1489 </dt>
1490 <dd>
1492 Git data exporter.
1493 </p>
1494 </dd>
1495 <dt class="hdlist1">
1496 <a href="git-fast-import.html">git-fast-import(1)</a>
1497 </dt>
1498 <dd>
1500 Backend for fast Git data importers.
1501 </p>
1502 </dd>
1503 <dt class="hdlist1">
1504 <a href="git-filter-branch.html">git-filter-branch(1)</a>
1505 </dt>
1506 <dd>
1508 Rewrite branches.
1509 </p>
1510 </dd>
1511 <dt class="hdlist1">
1512 <a href="git-mergetool.html">git-mergetool(1)</a>
1513 </dt>
1514 <dd>
1516 Run merge conflict resolution tools to resolve merge conflicts.
1517 </p>
1518 </dd>
1519 <dt class="hdlist1">
1520 <a href="git-pack-refs.html">git-pack-refs(1)</a>
1521 </dt>
1522 <dd>
1524 Pack heads and tags for efficient repository access.
1525 </p>
1526 </dd>
1527 <dt class="hdlist1">
1528 <a href="git-prune.html">git-prune(1)</a>
1529 </dt>
1530 <dd>
1532 Prune all unreachable objects from the object database.
1533 </p>
1534 </dd>
1535 <dt class="hdlist1">
1536 <a href="git-reflog.html">git-reflog(1)</a>
1537 </dt>
1538 <dd>
1540 Manage reflog information.
1541 </p>
1542 </dd>
1543 <dt class="hdlist1">
1544 <a href="git-refs.html">git-refs(1)</a>
1545 </dt>
1546 <dd>
1548 Low-level access to refs.
1549 </p>
1550 </dd>
1551 <dt class="hdlist1">
1552 <a href="git-remote.html">git-remote(1)</a>
1553 </dt>
1554 <dd>
1556 Manage set of tracked repositories.
1557 </p>
1558 </dd>
1559 <dt class="hdlist1">
1560 <a href="git-repack.html">git-repack(1)</a>
1561 </dt>
1562 <dd>
1564 Pack unpacked objects in a repository.
1565 </p>
1566 </dd>
1567 <dt class="hdlist1">
1568 <a href="git-replace.html">git-replace(1)</a>
1569 </dt>
1570 <dd>
1572 Create, list, delete refs to replace objects.
1573 </p>
1574 </dd>
1575 </dl></div>
1576 <div class="paragraph"><p>Interrogators:</p></div>
1577 <div class="dlist"><dl>
1578 <dt class="hdlist1">
1579 <a href="git-annotate.html">git-annotate(1)</a>
1580 </dt>
1581 <dd>
1583 Annotate file lines with commit information.
1584 </p>
1585 </dd>
1586 <dt class="hdlist1">
1587 <a href="git-blame.html">git-blame(1)</a>
1588 </dt>
1589 <dd>
1591 Show what revision and author last modified each line of a file.
1592 </p>
1593 </dd>
1594 <dt class="hdlist1">
1595 <a href="git-bugreport.html">git-bugreport(1)</a>
1596 </dt>
1597 <dd>
1599 Collect information for user to file a bug report.
1600 </p>
1601 </dd>
1602 <dt class="hdlist1">
1603 <a href="git-count-objects.html">git-count-objects(1)</a>
1604 </dt>
1605 <dd>
1607 Count unpacked number of objects and their disk consumption.
1608 </p>
1609 </dd>
1610 <dt class="hdlist1">
1611 <a href="git-diagnose.html">git-diagnose(1)</a>
1612 </dt>
1613 <dd>
1615 Generate a zip archive of diagnostic information.
1616 </p>
1617 </dd>
1618 <dt class="hdlist1">
1619 <a href="git-difftool.html">git-difftool(1)</a>
1620 </dt>
1621 <dd>
1623 Show changes using common diff tools.
1624 </p>
1625 </dd>
1626 <dt class="hdlist1">
1627 <a href="git-fsck.html">git-fsck(1)</a>
1628 </dt>
1629 <dd>
1631 Verifies the connectivity and validity of the objects in the database.
1632 </p>
1633 </dd>
1634 <dt class="hdlist1">
1635 <a href="git-help.html">git-help(1)</a>
1636 </dt>
1637 <dd>
1639 Display help information about Git.
1640 </p>
1641 </dd>
1642 <dt class="hdlist1">
1643 <a href="git-instaweb.html">git-instaweb(1)</a>
1644 </dt>
1645 <dd>
1647 Instantly browse your working repository in gitweb.
1648 </p>
1649 </dd>
1650 <dt class="hdlist1">
1651 <a href="git-merge-tree.html">git-merge-tree(1)</a>
1652 </dt>
1653 <dd>
1655 Perform merge without touching index or working tree.
1656 </p>
1657 </dd>
1658 <dt class="hdlist1">
1659 <a href="git-rerere.html">git-rerere(1)</a>
1660 </dt>
1661 <dd>
1663 Reuse recorded resolution of conflicted merges.
1664 </p>
1665 </dd>
1666 <dt class="hdlist1">
1667 <a href="git-show-branch.html">git-show-branch(1)</a>
1668 </dt>
1669 <dd>
1671 Show branches and their commits.
1672 </p>
1673 </dd>
1674 <dt class="hdlist1">
1675 <a href="git-verify-commit.html">git-verify-commit(1)</a>
1676 </dt>
1677 <dd>
1679 Check the GPG signature of commits.
1680 </p>
1681 </dd>
1682 <dt class="hdlist1">
1683 <a href="git-verify-tag.html">git-verify-tag(1)</a>
1684 </dt>
1685 <dd>
1687 Check the GPG signature of tags.
1688 </p>
1689 </dd>
1690 <dt class="hdlist1">
1691 <a href="git-version.html">git-version(1)</a>
1692 </dt>
1693 <dd>
1695 Display version information about Git.
1696 </p>
1697 </dd>
1698 <dt class="hdlist1">
1699 <a href="git-whatchanged.html">git-whatchanged(1)</a>
1700 </dt>
1701 <dd>
1703 Show logs with differences each commit introduces.
1704 </p>
1705 </dd>
1706 <dt class="hdlist1">
1707 <a href="gitweb.html">gitweb(1)</a>
1708 </dt>
1709 <dd>
1711 Git web interface (web frontend to Git repositories).
1712 </p>
1713 </dd>
1714 </dl></div>
1715 </div>
1716 <div class="sect2">
1717 <h3 id="_interacting_with_others">Interacting with Others</h3>
1718 <div class="paragraph"><p>These commands are to interact with foreign SCM and with other
1719 people via patch over e-mail.</p></div>
1720 <div class="dlist"><dl>
1721 <dt class="hdlist1">
1722 <a href="git-archimport.html">git-archimport(1)</a>
1723 </dt>
1724 <dd>
1726 Import a GNU Arch repository into Git.
1727 </p>
1728 </dd>
1729 <dt class="hdlist1">
1730 <a href="git-cvsexportcommit.html">git-cvsexportcommit(1)</a>
1731 </dt>
1732 <dd>
1734 Export a single commit to a CVS checkout.
1735 </p>
1736 </dd>
1737 <dt class="hdlist1">
1738 <a href="git-cvsimport.html">git-cvsimport(1)</a>
1739 </dt>
1740 <dd>
1742 Salvage your data out of another SCM people love to hate.
1743 </p>
1744 </dd>
1745 <dt class="hdlist1">
1746 <a href="git-cvsserver.html">git-cvsserver(1)</a>
1747 </dt>
1748 <dd>
1750 A CVS server emulator for Git.
1751 </p>
1752 </dd>
1753 <dt class="hdlist1">
1754 <a href="git-imap-send.html">git-imap-send(1)</a>
1755 </dt>
1756 <dd>
1758 Send a collection of patches from stdin to an IMAP folder.
1759 </p>
1760 </dd>
1761 <dt class="hdlist1">
1762 <a href="git-p4.html">git-p4(1)</a>
1763 </dt>
1764 <dd>
1766 Import from and submit to Perforce repositories.
1767 </p>
1768 </dd>
1769 <dt class="hdlist1">
1770 <a href="git-quiltimport.html">git-quiltimport(1)</a>
1771 </dt>
1772 <dd>
1774 Applies a quilt patchset onto the current branch.
1775 </p>
1776 </dd>
1777 <dt class="hdlist1">
1778 <a href="git-request-pull.html">git-request-pull(1)</a>
1779 </dt>
1780 <dd>
1782 Generates a summary of pending changes.
1783 </p>
1784 </dd>
1785 <dt class="hdlist1">
1786 <a href="git-send-email.html">git-send-email(1)</a>
1787 </dt>
1788 <dd>
1790 Send a collection of patches as emails.
1791 </p>
1792 </dd>
1793 <dt class="hdlist1">
1794 <a href="git-svn.html">git-svn(1)</a>
1795 </dt>
1796 <dd>
1798 Bidirectional operation between a Subversion repository and Git.
1799 </p>
1800 </dd>
1801 </dl></div>
1802 </div>
1803 <div class="sect2">
1804 <h3 id="_reset_restore_and_revert">Reset, restore and revert</h3>
1805 <div class="paragraph"><p>There are three commands with similar names: <code>git reset</code>,
1806 <code>git restore</code> and <code>git revert</code>.</p></div>
1807 <div class="ulist"><ul>
1808 <li>
1810 <a href="git-revert.html">git-revert(1)</a> is about making a new commit that reverts the
1811 changes made by other commits.
1812 </p>
1813 </li>
1814 <li>
1816 <a href="git-restore.html">git-restore(1)</a> is about restoring files in the working tree
1817 from either the index or another commit. This command does not
1818 update your branch. The command can also be used to restore files in
1819 the index from another commit.
1820 </p>
1821 </li>
1822 <li>
1824 <a href="git-reset.html">git-reset(1)</a> is about updating your branch, moving the tip
1825 in order to add or remove commits from the branch. This operation
1826 changes the commit history.
1827 </p>
1828 <div class="paragraph"><p><code>git reset</code> can also be used to restore the index, overlapping with
1829 <code>git restore</code>.</p></div>
1830 </li>
1831 </ul></div>
1832 </div>
1833 </div>
1834 </div>
1835 <div class="sect1">
1836 <h2 id="_low_level_commands_plumbing">Low-level commands (plumbing)</h2>
1837 <div class="sectionbody">
1838 <div class="paragraph"><p>Although Git includes its
1839 own porcelain layer, its low-level commands are sufficient to support
1840 development of alternative porcelains. Developers of such porcelains
1841 might start by reading about <a href="git-update-index.html">git-update-index(1)</a> and
1842 <a href="git-read-tree.html">git-read-tree(1)</a>.</p></div>
1843 <div class="paragraph"><p>The interface (input, output, set of options and the semantics)
1844 to these low-level commands are meant to be a lot more stable
1845 than Porcelain level commands, because these commands are
1846 primarily for scripted use. The interface to Porcelain commands
1847 on the other hand are subject to change in order to improve the
1848 end user experience.</p></div>
1849 <div class="paragraph"><p>The following description divides
1850 the low-level commands into commands that manipulate objects (in
1851 the repository, index, and working tree), commands that interrogate and
1852 compare objects, and commands that move objects and references between
1853 repositories.</p></div>
1854 <div class="sect2">
1855 <h3 id="_manipulation_commands">Manipulation commands</h3>
1856 <div class="dlist"><dl>
1857 <dt class="hdlist1">
1858 <a href="git-apply.html">git-apply(1)</a>
1859 </dt>
1860 <dd>
1862 Apply a patch to files and/or to the index.
1863 </p>
1864 </dd>
1865 <dt class="hdlist1">
1866 <a href="git-checkout-index.html">git-checkout-index(1)</a>
1867 </dt>
1868 <dd>
1870 Copy files from the index to the working tree.
1871 </p>
1872 </dd>
1873 <dt class="hdlist1">
1874 <a href="git-commit-graph.html">git-commit-graph(1)</a>
1875 </dt>
1876 <dd>
1878 Write and verify Git commit-graph files.
1879 </p>
1880 </dd>
1881 <dt class="hdlist1">
1882 <a href="git-commit-tree.html">git-commit-tree(1)</a>
1883 </dt>
1884 <dd>
1886 Create a new commit object.
1887 </p>
1888 </dd>
1889 <dt class="hdlist1">
1890 <a href="git-hash-object.html">git-hash-object(1)</a>
1891 </dt>
1892 <dd>
1894 Compute object ID and optionally create an object from a file.
1895 </p>
1896 </dd>
1897 <dt class="hdlist1">
1898 <a href="git-index-pack.html">git-index-pack(1)</a>
1899 </dt>
1900 <dd>
1902 Build pack index file for an existing packed archive.
1903 </p>
1904 </dd>
1905 <dt class="hdlist1">
1906 <a href="git-merge-file.html">git-merge-file(1)</a>
1907 </dt>
1908 <dd>
1910 Run a three-way file merge.
1911 </p>
1912 </dd>
1913 <dt class="hdlist1">
1914 <a href="git-merge-index.html">git-merge-index(1)</a>
1915 </dt>
1916 <dd>
1918 Run a merge for files needing merging.
1919 </p>
1920 </dd>
1921 <dt class="hdlist1">
1922 <a href="git-mktag.html">git-mktag(1)</a>
1923 </dt>
1924 <dd>
1926 Creates a tag object with extra validation.
1927 </p>
1928 </dd>
1929 <dt class="hdlist1">
1930 <a href="git-mktree.html">git-mktree(1)</a>
1931 </dt>
1932 <dd>
1934 Build a tree-object from ls-tree formatted text.
1935 </p>
1936 </dd>
1937 <dt class="hdlist1">
1938 <a href="git-multi-pack-index.html">git-multi-pack-index(1)</a>
1939 </dt>
1940 <dd>
1942 Write and verify multi-pack-indexes.
1943 </p>
1944 </dd>
1945 <dt class="hdlist1">
1946 <a href="git-pack-objects.html">git-pack-objects(1)</a>
1947 </dt>
1948 <dd>
1950 Create a packed archive of objects.
1951 </p>
1952 </dd>
1953 <dt class="hdlist1">
1954 <a href="git-prune-packed.html">git-prune-packed(1)</a>
1955 </dt>
1956 <dd>
1958 Remove extra objects that are already in pack files.
1959 </p>
1960 </dd>
1961 <dt class="hdlist1">
1962 <a href="git-read-tree.html">git-read-tree(1)</a>
1963 </dt>
1964 <dd>
1966 Reads tree information into the index.
1967 </p>
1968 </dd>
1969 <dt class="hdlist1">
1970 <a href="git-replay.html">git-replay(1)</a>
1971 </dt>
1972 <dd>
1974 EXPERIMENTAL: Replay commits on a new base, works with bare repos too.
1975 </p>
1976 </dd>
1977 <dt class="hdlist1">
1978 <a href="git-symbolic-ref.html">git-symbolic-ref(1)</a>
1979 </dt>
1980 <dd>
1982 Read, modify and delete symbolic refs.
1983 </p>
1984 </dd>
1985 <dt class="hdlist1">
1986 <a href="git-unpack-objects.html">git-unpack-objects(1)</a>
1987 </dt>
1988 <dd>
1990 Unpack objects from a packed archive.
1991 </p>
1992 </dd>
1993 <dt class="hdlist1">
1994 <a href="git-update-index.html">git-update-index(1)</a>
1995 </dt>
1996 <dd>
1998 Register file contents in the working tree to the index.
1999 </p>
2000 </dd>
2001 <dt class="hdlist1">
2002 <a href="git-update-ref.html">git-update-ref(1)</a>
2003 </dt>
2004 <dd>
2006 Update the object name stored in a ref safely.
2007 </p>
2008 </dd>
2009 <dt class="hdlist1">
2010 <a href="git-write-tree.html">git-write-tree(1)</a>
2011 </dt>
2012 <dd>
2014 Create a tree object from the current index.
2015 </p>
2016 </dd>
2017 </dl></div>
2018 </div>
2019 <div class="sect2">
2020 <h3 id="_interrogation_commands">Interrogation commands</h3>
2021 <div class="dlist"><dl>
2022 <dt class="hdlist1">
2023 <a href="git-cat-file.html">git-cat-file(1)</a>
2024 </dt>
2025 <dd>
2027 Provide contents or details of repository objects.
2028 </p>
2029 </dd>
2030 <dt class="hdlist1">
2031 <a href="git-cherry.html">git-cherry(1)</a>
2032 </dt>
2033 <dd>
2035 Find commits yet to be applied to upstream.
2036 </p>
2037 </dd>
2038 <dt class="hdlist1">
2039 <a href="git-diff-files.html">git-diff-files(1)</a>
2040 </dt>
2041 <dd>
2043 Compares files in the working tree and the index.
2044 </p>
2045 </dd>
2046 <dt class="hdlist1">
2047 <a href="git-diff-index.html">git-diff-index(1)</a>
2048 </dt>
2049 <dd>
2051 Compare a tree to the working tree or index.
2052 </p>
2053 </dd>
2054 <dt class="hdlist1">
2055 <a href="git-diff-tree.html">git-diff-tree(1)</a>
2056 </dt>
2057 <dd>
2059 Compares the content and mode of blobs found via two tree objects.
2060 </p>
2061 </dd>
2062 <dt class="hdlist1">
2063 <a href="git-for-each-ref.html">git-for-each-ref(1)</a>
2064 </dt>
2065 <dd>
2067 Output information on each ref.
2068 </p>
2069 </dd>
2070 <dt class="hdlist1">
2071 <a href="git-for-each-repo.html">git-for-each-repo(1)</a>
2072 </dt>
2073 <dd>
2075 Run a Git command on a list of repositories.
2076 </p>
2077 </dd>
2078 <dt class="hdlist1">
2079 <a href="git-get-tar-commit-id.html">git-get-tar-commit-id(1)</a>
2080 </dt>
2081 <dd>
2083 Extract commit ID from an archive created using git-archive.
2084 </p>
2085 </dd>
2086 <dt class="hdlist1">
2087 <a href="git-ls-files.html">git-ls-files(1)</a>
2088 </dt>
2089 <dd>
2091 Show information about files in the index and the working tree.
2092 </p>
2093 </dd>
2094 <dt class="hdlist1">
2095 <a href="git-ls-remote.html">git-ls-remote(1)</a>
2096 </dt>
2097 <dd>
2099 List references in a remote repository.
2100 </p>
2101 </dd>
2102 <dt class="hdlist1">
2103 <a href="git-ls-tree.html">git-ls-tree(1)</a>
2104 </dt>
2105 <dd>
2107 List the contents of a tree object.
2108 </p>
2109 </dd>
2110 <dt class="hdlist1">
2111 <a href="git-merge-base.html">git-merge-base(1)</a>
2112 </dt>
2113 <dd>
2115 Find as good common ancestors as possible for a merge.
2116 </p>
2117 </dd>
2118 <dt class="hdlist1">
2119 <a href="git-name-rev.html">git-name-rev(1)</a>
2120 </dt>
2121 <dd>
2123 Find symbolic names for given revs.
2124 </p>
2125 </dd>
2126 <dt class="hdlist1">
2127 <a href="git-pack-redundant.html">git-pack-redundant(1)</a>
2128 </dt>
2129 <dd>
2131 Find redundant pack files.
2132 </p>
2133 </dd>
2134 <dt class="hdlist1">
2135 <a href="git-rev-list.html">git-rev-list(1)</a>
2136 </dt>
2137 <dd>
2139 Lists commit objects in reverse chronological order.
2140 </p>
2141 </dd>
2142 <dt class="hdlist1">
2143 <a href="git-rev-parse.html">git-rev-parse(1)</a>
2144 </dt>
2145 <dd>
2147 Pick out and massage parameters.
2148 </p>
2149 </dd>
2150 <dt class="hdlist1">
2151 <a href="git-show-index.html">git-show-index(1)</a>
2152 </dt>
2153 <dd>
2155 Show packed archive index.
2156 </p>
2157 </dd>
2158 <dt class="hdlist1">
2159 <a href="git-show-ref.html">git-show-ref(1)</a>
2160 </dt>
2161 <dd>
2163 List references in a local repository.
2164 </p>
2165 </dd>
2166 <dt class="hdlist1">
2167 <a href="git-unpack-file.html">git-unpack-file(1)</a>
2168 </dt>
2169 <dd>
2171 Creates a temporary file with a blob&#8217;s contents.
2172 </p>
2173 </dd>
2174 <dt class="hdlist1">
2175 <a href="git-var.html">git-var(1)</a>
2176 </dt>
2177 <dd>
2179 Show a Git logical variable.
2180 </p>
2181 </dd>
2182 <dt class="hdlist1">
2183 <a href="git-verify-pack.html">git-verify-pack(1)</a>
2184 </dt>
2185 <dd>
2187 Validate packed Git archive files.
2188 </p>
2189 </dd>
2190 </dl></div>
2191 <div class="paragraph"><p>In general, the interrogate commands do not touch the files in
2192 the working tree.</p></div>
2193 </div>
2194 <div class="sect2">
2195 <h3 id="_syncing_repositories">Syncing repositories</h3>
2196 <div class="dlist"><dl>
2197 <dt class="hdlist1">
2198 <a href="git-daemon.html">git-daemon(1)</a>
2199 </dt>
2200 <dd>
2202 A really simple server for Git repositories.
2203 </p>
2204 </dd>
2205 <dt class="hdlist1">
2206 <a href="git-fetch-pack.html">git-fetch-pack(1)</a>
2207 </dt>
2208 <dd>
2210 Receive missing objects from another repository.
2211 </p>
2212 </dd>
2213 <dt class="hdlist1">
2214 <a href="git-http-backend.html">git-http-backend(1)</a>
2215 </dt>
2216 <dd>
2218 Server side implementation of Git over HTTP.
2219 </p>
2220 </dd>
2221 <dt class="hdlist1">
2222 <a href="git-send-pack.html">git-send-pack(1)</a>
2223 </dt>
2224 <dd>
2226 Push objects over Git protocol to another repository.
2227 </p>
2228 </dd>
2229 <dt class="hdlist1">
2230 <a href="git-update-server-info.html">git-update-server-info(1)</a>
2231 </dt>
2232 <dd>
2234 Update auxiliary info file to help dumb servers.
2235 </p>
2236 </dd>
2237 </dl></div>
2238 <div class="paragraph"><p>The following are helper commands used by the above; end users
2239 typically do not use them directly.</p></div>
2240 <div class="dlist"><dl>
2241 <dt class="hdlist1">
2242 <a href="git-http-fetch.html">git-http-fetch(1)</a>
2243 </dt>
2244 <dd>
2246 Download from a remote Git repository via HTTP.
2247 </p>
2248 </dd>
2249 <dt class="hdlist1">
2250 <a href="git-http-push.html">git-http-push(1)</a>
2251 </dt>
2252 <dd>
2254 Push objects over HTTP/DAV to another repository.
2255 </p>
2256 </dd>
2257 <dt class="hdlist1">
2258 <a href="git-receive-pack.html">git-receive-pack(1)</a>
2259 </dt>
2260 <dd>
2262 Receive what is pushed into the repository.
2263 </p>
2264 </dd>
2265 <dt class="hdlist1">
2266 <a href="git-shell.html">git-shell(1)</a>
2267 </dt>
2268 <dd>
2270 Restricted login shell for Git-only SSH access.
2271 </p>
2272 </dd>
2273 <dt class="hdlist1">
2274 <a href="git-upload-archive.html">git-upload-archive(1)</a>
2275 </dt>
2276 <dd>
2278 Send archive back to git-archive.
2279 </p>
2280 </dd>
2281 <dt class="hdlist1">
2282 <a href="git-upload-pack.html">git-upload-pack(1)</a>
2283 </dt>
2284 <dd>
2286 Send objects packed back to git-fetch-pack.
2287 </p>
2288 </dd>
2289 </dl></div>
2290 </div>
2291 <div class="sect2">
2292 <h3 id="_internal_helper_commands">Internal helper commands</h3>
2293 <div class="paragraph"><p>These are internal helper commands used by other commands; end
2294 users typically do not use them directly.</p></div>
2295 <div class="dlist"><dl>
2296 <dt class="hdlist1">
2297 <a href="git-check-attr.html">git-check-attr(1)</a>
2298 </dt>
2299 <dd>
2301 Display gitattributes information.
2302 </p>
2303 </dd>
2304 <dt class="hdlist1">
2305 <a href="git-check-ignore.html">git-check-ignore(1)</a>
2306 </dt>
2307 <dd>
2309 Debug gitignore / exclude files.
2310 </p>
2311 </dd>
2312 <dt class="hdlist1">
2313 <a href="git-check-mailmap.html">git-check-mailmap(1)</a>
2314 </dt>
2315 <dd>
2317 Show canonical names and email addresses of contacts.
2318 </p>
2319 </dd>
2320 <dt class="hdlist1">
2321 <a href="git-check-ref-format.html">git-check-ref-format(1)</a>
2322 </dt>
2323 <dd>
2325 Ensures that a reference name is well formed.
2326 </p>
2327 </dd>
2328 <dt class="hdlist1">
2329 <a href="git-column.html">git-column(1)</a>
2330 </dt>
2331 <dd>
2333 Display data in columns.
2334 </p>
2335 </dd>
2336 <dt class="hdlist1">
2337 <a href="git-credential.html">git-credential(1)</a>
2338 </dt>
2339 <dd>
2341 Retrieve and store user credentials.
2342 </p>
2343 </dd>
2344 <dt class="hdlist1">
2345 <a href="git-credential-cache.html">git-credential-cache(1)</a>
2346 </dt>
2347 <dd>
2349 Helper to temporarily store passwords in memory.
2350 </p>
2351 </dd>
2352 <dt class="hdlist1">
2353 <a href="git-credential-store.html">git-credential-store(1)</a>
2354 </dt>
2355 <dd>
2357 Helper to store credentials on disk.
2358 </p>
2359 </dd>
2360 <dt class="hdlist1">
2361 <a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>
2362 </dt>
2363 <dd>
2365 Produce a merge commit message.
2366 </p>
2367 </dd>
2368 <dt class="hdlist1">
2369 <a href="git-hook.html">git-hook(1)</a>
2370 </dt>
2371 <dd>
2373 Run git hooks.
2374 </p>
2375 </dd>
2376 <dt class="hdlist1">
2377 <a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>
2378 </dt>
2379 <dd>
2381 Add or parse structured information in commit messages.
2382 </p>
2383 </dd>
2384 <dt class="hdlist1">
2385 <a href="git-mailinfo.html">git-mailinfo(1)</a>
2386 </dt>
2387 <dd>
2389 Extracts patch and authorship from a single e-mail message.
2390 </p>
2391 </dd>
2392 <dt class="hdlist1">
2393 <a href="git-mailsplit.html">git-mailsplit(1)</a>
2394 </dt>
2395 <dd>
2397 Simple UNIX mbox splitter program.
2398 </p>
2399 </dd>
2400 <dt class="hdlist1">
2401 <a href="git-merge-one-file.html">git-merge-one-file(1)</a>
2402 </dt>
2403 <dd>
2405 The standard helper program to use with git-merge-index.
2406 </p>
2407 </dd>
2408 <dt class="hdlist1">
2409 <a href="git-patch-id.html">git-patch-id(1)</a>
2410 </dt>
2411 <dd>
2413 Compute unique ID for a patch.
2414 </p>
2415 </dd>
2416 <dt class="hdlist1">
2417 <a href="git-sh-i18n.html">git-sh-i18n(1)</a>
2418 </dt>
2419 <dd>
2421 Git&#8217;s i18n setup code for shell scripts.
2422 </p>
2423 </dd>
2424 <dt class="hdlist1">
2425 <a href="git-sh-setup.html">git-sh-setup(1)</a>
2426 </dt>
2427 <dd>
2429 Common Git shell script setup code.
2430 </p>
2431 </dd>
2432 <dt class="hdlist1">
2433 <a href="git-stripspace.html">git-stripspace(1)</a>
2434 </dt>
2435 <dd>
2437 Remove unnecessary whitespace.
2438 </p>
2439 </dd>
2440 </dl></div>
2441 </div>
2442 </div>
2443 </div>
2444 <div class="sect1">
2445 <h2 id="_guides">Guides</h2>
2446 <div class="sectionbody">
2447 <div class="paragraph"><p>The following documentation pages are guides about Git concepts.</p></div>
2448 <div class="dlist"><dl>
2449 <dt class="hdlist1">
2450 <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>
2451 </dt>
2452 <dd>
2454 A Git core tutorial for developers.
2455 </p>
2456 </dd>
2457 <dt class="hdlist1">
2458 <a href="gitcredentials.html">gitcredentials(7)</a>
2459 </dt>
2460 <dd>
2462 Providing usernames and passwords to Git.
2463 </p>
2464 </dd>
2465 <dt class="hdlist1">
2466 <a href="gitcvs-migration.html">gitcvs-migration(7)</a>
2467 </dt>
2468 <dd>
2470 Git for CVS users.
2471 </p>
2472 </dd>
2473 <dt class="hdlist1">
2474 <a href="gitdiffcore.html">gitdiffcore(7)</a>
2475 </dt>
2476 <dd>
2478 Tweaking diff output.
2479 </p>
2480 </dd>
2481 <dt class="hdlist1">
2482 <a href="giteveryday.html">giteveryday(7)</a>
2483 </dt>
2484 <dd>
2486 A useful minimum set of commands for Everyday Git.
2487 </p>
2488 </dd>
2489 <dt class="hdlist1">
2490 <a href="gitfaq.html">gitfaq(7)</a>
2491 </dt>
2492 <dd>
2494 Frequently asked questions about using Git.
2495 </p>
2496 </dd>
2497 <dt class="hdlist1">
2498 <a href="gitglossary.html">gitglossary(7)</a>
2499 </dt>
2500 <dd>
2502 A Git Glossary.
2503 </p>
2504 </dd>
2505 <dt class="hdlist1">
2506 <a href="gitnamespaces.html">gitnamespaces(7)</a>
2507 </dt>
2508 <dd>
2510 Git namespaces.
2511 </p>
2512 </dd>
2513 <dt class="hdlist1">
2514 <a href="gitremote-helpers.html">gitremote-helpers(7)</a>
2515 </dt>
2516 <dd>
2518 Helper programs to interact with remote repositories.
2519 </p>
2520 </dd>
2521 <dt class="hdlist1">
2522 <a href="gitsubmodules.html">gitsubmodules(7)</a>
2523 </dt>
2524 <dd>
2526 Mounting one repository inside another.
2527 </p>
2528 </dd>
2529 <dt class="hdlist1">
2530 <a href="gittutorial.html">gittutorial(7)</a>
2531 </dt>
2532 <dd>
2534 A tutorial introduction to Git.
2535 </p>
2536 </dd>
2537 <dt class="hdlist1">
2538 <a href="gittutorial-2.html">gittutorial-2(7)</a>
2539 </dt>
2540 <dd>
2542 A tutorial introduction to Git: part two.
2543 </p>
2544 </dd>
2545 <dt class="hdlist1">
2546 <a href="gitworkflows.html">gitworkflows(7)</a>
2547 </dt>
2548 <dd>
2550 An overview of recommended workflows with Git.
2551 </p>
2552 </dd>
2553 </dl></div>
2554 </div>
2555 </div>
2556 <div class="sect1">
2557 <h2 id="_repository_command_and_file_interfaces">Repository, command and file interfaces</h2>
2558 <div class="sectionbody">
2559 <div class="paragraph"><p>This documentation discusses repository and command interfaces which
2560 users are expected to interact with directly. See <code>--user-formats</code> in
2561 <a href="git-help.html">git-help(1)</a> for more details on the criteria.</p></div>
2562 <div class="dlist"><dl>
2563 <dt class="hdlist1">
2564 <a href="gitattributes.html">gitattributes(5)</a>
2565 </dt>
2566 <dd>
2568 Defining attributes per path.
2569 </p>
2570 </dd>
2571 <dt class="hdlist1">
2572 <a href="gitcli.html">gitcli(7)</a>
2573 </dt>
2574 <dd>
2576 Git command-line interface and conventions.
2577 </p>
2578 </dd>
2579 <dt class="hdlist1">
2580 <a href="githooks.html">githooks(5)</a>
2581 </dt>
2582 <dd>
2584 Hooks used by Git.
2585 </p>
2586 </dd>
2587 <dt class="hdlist1">
2588 <a href="gitignore.html">gitignore(5)</a>
2589 </dt>
2590 <dd>
2592 Specifies intentionally untracked files to ignore.
2593 </p>
2594 </dd>
2595 <dt class="hdlist1">
2596 <a href="gitmailmap.html">gitmailmap(5)</a>
2597 </dt>
2598 <dd>
2600 Map author/committer names and/or E-Mail addresses.
2601 </p>
2602 </dd>
2603 <dt class="hdlist1">
2604 <a href="gitmodules.html">gitmodules(5)</a>
2605 </dt>
2606 <dd>
2608 Defining submodule properties.
2609 </p>
2610 </dd>
2611 <dt class="hdlist1">
2612 <a href="gitrepository-layout.html">gitrepository-layout(5)</a>
2613 </dt>
2614 <dd>
2616 Git Repository Layout.
2617 </p>
2618 </dd>
2619 <dt class="hdlist1">
2620 <a href="gitrevisions.html">gitrevisions(7)</a>
2621 </dt>
2622 <dd>
2624 Specifying revisions and ranges for Git.
2625 </p>
2626 </dd>
2627 </dl></div>
2628 </div>
2629 </div>
2630 <div class="sect1">
2631 <h2 id="_file_formats_protocols_and_other_developer_interfaces">File formats, protocols and other developer interfaces</h2>
2632 <div class="sectionbody">
2633 <div class="paragraph"><p>This documentation discusses file formats, over-the-wire protocols and
2634 other git developer interfaces. See <code>--developer-interfaces</code> in
2635 <a href="git-help.html">git-help(1)</a>.</p></div>
2636 <div class="dlist"><dl>
2637 <dt class="hdlist1">
2638 <a href="gitformat-bundle.html">gitformat-bundle(5)</a>
2639 </dt>
2640 <dd>
2642 The bundle file format.
2643 </p>
2644 </dd>
2645 <dt class="hdlist1">
2646 <a href="gitformat-chunk.html">gitformat-chunk(5)</a>
2647 </dt>
2648 <dd>
2650 Chunk-based file formats.
2651 </p>
2652 </dd>
2653 <dt class="hdlist1">
2654 <a href="gitformat-commit-graph.html">gitformat-commit-graph(5)</a>
2655 </dt>
2656 <dd>
2658 Git commit-graph format.
2659 </p>
2660 </dd>
2661 <dt class="hdlist1">
2662 <a href="gitformat-index.html">gitformat-index(5)</a>
2663 </dt>
2664 <dd>
2666 Git index format.
2667 </p>
2668 </dd>
2669 <dt class="hdlist1">
2670 <a href="gitformat-pack.html">gitformat-pack(5)</a>
2671 </dt>
2672 <dd>
2674 Git pack format.
2675 </p>
2676 </dd>
2677 <dt class="hdlist1">
2678 <a href="gitformat-signature.html">gitformat-signature(5)</a>
2679 </dt>
2680 <dd>
2682 Git cryptographic signature formats.
2683 </p>
2684 </dd>
2685 <dt class="hdlist1">
2686 <a href="gitprotocol-capabilities.html">gitprotocol-capabilities(5)</a>
2687 </dt>
2688 <dd>
2690 Protocol v0 and v1 capabilities.
2691 </p>
2692 </dd>
2693 <dt class="hdlist1">
2694 <a href="gitprotocol-common.html">gitprotocol-common(5)</a>
2695 </dt>
2696 <dd>
2698 Things common to various protocols.
2699 </p>
2700 </dd>
2701 <dt class="hdlist1">
2702 <a href="gitprotocol-http.html">gitprotocol-http(5)</a>
2703 </dt>
2704 <dd>
2706 Git HTTP-based protocols.
2707 </p>
2708 </dd>
2709 <dt class="hdlist1">
2710 <a href="gitprotocol-pack.html">gitprotocol-pack(5)</a>
2711 </dt>
2712 <dd>
2714 How packs are transferred over-the-wire.
2715 </p>
2716 </dd>
2717 <dt class="hdlist1">
2718 <a href="gitprotocol-v2.html">gitprotocol-v2(5)</a>
2719 </dt>
2720 <dd>
2722 Git Wire Protocol, Version 2.
2723 </p>
2724 </dd>
2725 </dl></div>
2726 </div>
2727 </div>
2728 <div class="sect1">
2729 <h2 id="_configuration_mechanism">Configuration Mechanism</h2>
2730 <div class="sectionbody">
2731 <div class="paragraph"><p>Git uses a simple text format to store customizations that are per
2732 repository and are per user. Such a configuration file may look
2733 like this:</p></div>
2734 <div class="listingblock">
2735 <div class="content">
2736 <pre><code>#
2737 # A '#' or ';' character indicates a comment.
2740 ; core variables
2741 [core]
2742 ; Don't trust file modes
2743 filemode = false
2745 ; user identity
2746 [user]
2747 name = "Junio C Hamano"
2748 email = "gitster@pobox.com"</code></pre>
2749 </div></div>
2750 <div class="paragraph"><p>Various commands read from the configuration file and adjust
2751 their operation accordingly. See <a href="git-config.html">git-config(1)</a> for a
2752 list and more details about the configuration mechanism.</p></div>
2753 </div>
2754 </div>
2755 <div class="sect1">
2756 <h2 id="_identifier_terminology">Identifier Terminology</h2>
2757 <div class="sectionbody">
2758 <div class="dlist"><dl>
2759 <dt class="hdlist1">
2760 &lt;object&gt;
2761 </dt>
2762 <dd>
2764 Indicates the object name for any type of object.
2765 </p>
2766 </dd>
2767 <dt class="hdlist1">
2768 &lt;blob&gt;
2769 </dt>
2770 <dd>
2772 Indicates a blob object name.
2773 </p>
2774 </dd>
2775 <dt class="hdlist1">
2776 &lt;tree&gt;
2777 </dt>
2778 <dd>
2780 Indicates a tree object name.
2781 </p>
2782 </dd>
2783 <dt class="hdlist1">
2784 &lt;commit&gt;
2785 </dt>
2786 <dd>
2788 Indicates a commit object name.
2789 </p>
2790 </dd>
2791 <dt class="hdlist1">
2792 &lt;tree-ish&gt;
2793 </dt>
2794 <dd>
2796 Indicates a tree, commit or tag object name. A
2797 command that takes a &lt;tree-ish&gt; argument ultimately wants to
2798 operate on a &lt;tree&gt; object but automatically dereferences
2799 &lt;commit&gt; and &lt;tag&gt; objects that point at a &lt;tree&gt;.
2800 </p>
2801 </dd>
2802 <dt class="hdlist1">
2803 &lt;commit-ish&gt;
2804 </dt>
2805 <dd>
2807 Indicates a commit or tag object name. A
2808 command that takes a &lt;commit-ish&gt; argument ultimately wants to
2809 operate on a &lt;commit&gt; object but automatically dereferences
2810 &lt;tag&gt; objects that point at a &lt;commit&gt;.
2811 </p>
2812 </dd>
2813 <dt class="hdlist1">
2814 &lt;type&gt;
2815 </dt>
2816 <dd>
2818 Indicates that an object type is required.
2819 Currently one of: <code>blob</code>, <code>tree</code>, <code>commit</code>, or <code>tag</code>.
2820 </p>
2821 </dd>
2822 <dt class="hdlist1">
2823 &lt;file&gt;
2824 </dt>
2825 <dd>
2827 Indicates a filename - almost always relative to the
2828 root of the tree structure <code>GIT_INDEX_FILE</code> describes.
2829 </p>
2830 </dd>
2831 </dl></div>
2832 </div>
2833 </div>
2834 <div class="sect1">
2835 <h2 id="_symbolic_identifiers">Symbolic Identifiers</h2>
2836 <div class="sectionbody">
2837 <div class="paragraph"><p>Any Git command accepting any &lt;object&gt; can also use the following
2838 symbolic notation:</p></div>
2839 <div class="dlist"><dl>
2840 <dt class="hdlist1">
2841 HEAD
2842 </dt>
2843 <dd>
2845 indicates the head of the current branch.
2846 </p>
2847 </dd>
2848 <dt class="hdlist1">
2849 &lt;tag&gt;
2850 </dt>
2851 <dd>
2853 a valid tag <em>name</em>
2854 (i.e. a <code>refs/tags/&lt;tag&gt;</code> reference).
2855 </p>
2856 </dd>
2857 <dt class="hdlist1">
2858 &lt;head&gt;
2859 </dt>
2860 <dd>
2862 a valid head <em>name</em>
2863 (i.e. a <code>refs/heads/&lt;head&gt;</code> reference).
2864 </p>
2865 </dd>
2866 </dl></div>
2867 <div class="paragraph"><p>For a more complete list of ways to spell object names, see
2868 "SPECIFYING REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>.</p></div>
2869 </div>
2870 </div>
2871 <div class="sect1">
2872 <h2 id="_file_directory_structure">File/Directory Structure</h2>
2873 <div class="sectionbody">
2874 <div class="paragraph"><p>Please see the <a href="gitrepository-layout.html">gitrepository-layout(5)</a> document.</p></div>
2875 <div class="paragraph"><p>Read <a href="githooks.html">githooks(5)</a> for more details about each hook.</p></div>
2876 <div class="paragraph"><p>Higher level SCMs may provide and manage additional information in the
2877 <code>$GIT_DIR</code>.</p></div>
2878 </div>
2879 </div>
2880 <div class="sect1">
2881 <h2 id="_terminology">Terminology</h2>
2882 <div class="sectionbody">
2883 <div class="paragraph"><p>Please see <a href="gitglossary.html">gitglossary(7)</a>.</p></div>
2884 </div>
2885 </div>
2886 <div class="sect1">
2887 <h2 id="_environment_variables">Environment Variables</h2>
2888 <div class="sectionbody">
2889 <div class="paragraph"><p>Various Git commands pay attention to environment variables and change
2890 their behavior. The environment variables marked as "Boolean" take
2891 their values the same way as Boolean valued configuration variables, e.g.
2892 "true", "yes", "on" and positive numbers are taken as "yes".</p></div>
2893 <div class="paragraph"><p>Here are the variables:</p></div>
2894 <div class="sect2">
2895 <h3 id="_the_git_repository">The Git Repository</h3>
2896 <div class="paragraph"><p>These environment variables apply to <em>all</em> core Git commands. Nb: it
2897 is worth noting that they may be used/overridden by SCMS sitting above
2898 Git so take care if using a foreign front-end.</p></div>
2899 <div class="dlist"><dl>
2900 <dt class="hdlist1">
2901 <code>GIT_INDEX_FILE</code>
2902 </dt>
2903 <dd>
2905 This environment variable specifies an alternate
2906 index file. If not specified, the default of <code>$GIT_DIR/index</code>
2907 is used.
2908 </p>
2909 </dd>
2910 <dt class="hdlist1">
2911 <code>GIT_INDEX_VERSION</code>
2912 </dt>
2913 <dd>
2915 This environment variable specifies what index version is used
2916 when writing the index file out. It won&#8217;t affect existing index
2917 files. By default index file version 2 or 3 is used. See
2918 <a href="git-update-index.html">git-update-index(1)</a> for more information.
2919 </p>
2920 </dd>
2921 <dt class="hdlist1">
2922 <code>GIT_OBJECT_DIRECTORY</code>
2923 </dt>
2924 <dd>
2926 If the object storage directory is specified via this
2927 environment variable then the sha1 directories are created
2928 underneath - otherwise the default <code>$GIT_DIR/objects</code>
2929 directory is used.
2930 </p>
2931 </dd>
2932 <dt class="hdlist1">
2933 <code>GIT_ALTERNATE_OBJECT_DIRECTORIES</code>
2934 </dt>
2935 <dd>
2937 Due to the immutable nature of Git objects, old objects can be
2938 archived into shared, read-only directories. This variable
2939 specifies a ":" separated (on Windows ";" separated) list
2940 of Git object directories which can be used to search for Git
2941 objects. New objects will not be written to these directories.
2942 </p>
2943 <div class="paragraph"><p>Entries that begin with <code>"</code> (double-quote) will be interpreted
2944 as C-style quoted paths, removing leading and trailing
2945 double-quotes and respecting backslash escapes. E.g., the value
2946 <code>"path-with-\"-and-:-in-it":vanilla-path</code> has two paths:
2947 <code>path-with-"-and-:-in-it</code> and <code>vanilla-path</code>.</p></div>
2948 </dd>
2949 <dt class="hdlist1">
2950 <code>GIT_DIR</code>
2951 </dt>
2952 <dd>
2954 If the <code>GIT_DIR</code> environment variable is set then it
2955 specifies a path to use instead of the default <code>.git</code>
2956 for the base of the repository.
2957 The <code>--git-dir</code> command-line option also sets this value.
2958 </p>
2959 </dd>
2960 <dt class="hdlist1">
2961 <code>GIT_WORK_TREE</code>
2962 </dt>
2963 <dd>
2965 Set the path to the root of the working tree.
2966 This can also be controlled by the <code>--work-tree</code> command-line
2967 option and the core.worktree configuration variable.
2968 </p>
2969 </dd>
2970 <dt class="hdlist1">
2971 <code>GIT_NAMESPACE</code>
2972 </dt>
2973 <dd>
2975 Set the Git namespace; see <a href="gitnamespaces.html">gitnamespaces(7)</a> for details.
2976 The <code>--namespace</code> command-line option also sets this value.
2977 </p>
2978 </dd>
2979 <dt class="hdlist1">
2980 <code>GIT_CEILING_DIRECTORIES</code>
2981 </dt>
2982 <dd>
2984 This should be a colon-separated list of absolute paths. If
2985 set, it is a list of directories that Git should not chdir up
2986 into while looking for a repository directory (useful for
2987 excluding slow-loading network directories). It will not
2988 exclude the current working directory or a GIT_DIR set on the
2989 command line or in the environment. Normally, Git has to read
2990 the entries in this list and resolve any symlink that
2991 might be present in order to compare them with the current
2992 directory. However, if even this access is slow, you
2993 can add an empty entry to the list to tell Git that the
2994 subsequent entries are not symlinks and needn&#8217;t be resolved;
2995 e.g.,
2996 <code>GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink</code>.
2997 </p>
2998 </dd>
2999 <dt class="hdlist1">
3000 <code>GIT_DISCOVERY_ACROSS_FILESYSTEM</code>
3001 </dt>
3002 <dd>
3004 When run in a directory that does not have ".git" repository
3005 directory, Git tries to find such a directory in the parent
3006 directories to find the top of the working tree, but by default it
3007 does not cross filesystem boundaries. This Boolean environment variable
3008 can be set to true to tell Git not to stop at filesystem
3009 boundaries. Like <code>GIT_CEILING_DIRECTORIES</code>, this will not affect
3010 an explicit repository directory set via <code>GIT_DIR</code> or on the
3011 command line.
3012 </p>
3013 </dd>
3014 <dt class="hdlist1">
3015 <code>GIT_COMMON_DIR</code>
3016 </dt>
3017 <dd>
3019 If this variable is set to a path, non-worktree files that are
3020 normally in $GIT_DIR will be taken from this path
3021 instead. Worktree-specific files such as HEAD or index are
3022 taken from $GIT_DIR. See <a href="gitrepository-layout.html">gitrepository-layout(5)</a> and
3023 <a href="git-worktree.html">git-worktree(1)</a> for
3024 details. This variable has lower precedence than other path
3025 variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY&#8230;
3026 </p>
3027 </dd>
3028 <dt class="hdlist1">
3029 <code>GIT_DEFAULT_HASH</code>
3030 </dt>
3031 <dd>
3033 If this variable is set, the default hash algorithm for new
3034 repositories will be set to this value. This value is
3035 ignored when cloning and the setting of the remote repository
3036 is always used. The default is "sha1".
3037 See <code>--object-format</code> in <a href="git-init.html">git-init(1)</a>.
3038 </p>
3039 </dd>
3040 <dt class="hdlist1">
3041 <code>GIT_DEFAULT_REF_FORMAT</code>
3042 </dt>
3043 <dd>
3045 If this variable is set, the default reference backend format for new
3046 repositories will be set to this value. The default is "files".
3047 See <code>--ref-format</code> in <a href="git-init.html">git-init(1)</a>.
3048 </p>
3049 </dd>
3050 </dl></div>
3051 </div>
3052 <div class="sect2">
3053 <h3 id="_git_commits">Git Commits</h3>
3054 <div class="dlist"><dl>
3055 <dt class="hdlist1">
3056 <code>GIT_AUTHOR_NAME</code>
3057 </dt>
3058 <dd>
3060 The human-readable name used in the author identity when creating commit or
3061 tag objects, or when writing reflogs. Overrides the <code>user.name</code> and
3062 <code>author.name</code> configuration settings.
3063 </p>
3064 </dd>
3065 <dt class="hdlist1">
3066 <code>GIT_AUTHOR_EMAIL</code>
3067 </dt>
3068 <dd>
3070 The email address used in the author identity when creating commit or
3071 tag objects, or when writing reflogs. Overrides the <code>user.email</code> and
3072 <code>author.email</code> configuration settings.
3073 </p>
3074 </dd>
3075 <dt class="hdlist1">
3076 <code>GIT_AUTHOR_DATE</code>
3077 </dt>
3078 <dd>
3080 The date used for the author identity when creating commit or tag objects, or
3081 when writing reflogs. See <a href="git-commit.html">git-commit(1)</a> for valid formats.
3082 </p>
3083 </dd>
3084 <dt class="hdlist1">
3085 <code>GIT_COMMITTER_NAME</code>
3086 </dt>
3087 <dd>
3089 The human-readable name used in the committer identity when creating commit or
3090 tag objects, or when writing reflogs. Overrides the <code>user.name</code> and
3091 <code>committer.name</code> configuration settings.
3092 </p>
3093 </dd>
3094 <dt class="hdlist1">
3095 <code>GIT_COMMITTER_EMAIL</code>
3096 </dt>
3097 <dd>
3099 The email address used in the author identity when creating commit or
3100 tag objects, or when writing reflogs. Overrides the <code>user.email</code> and
3101 <code>committer.email</code> configuration settings.
3102 </p>
3103 </dd>
3104 <dt class="hdlist1">
3105 <code>GIT_COMMITTER_DATE</code>
3106 </dt>
3107 <dd>
3109 The date used for the committer identity when creating commit or tag objects, or
3110 when writing reflogs. See <a href="git-commit.html">git-commit(1)</a> for valid formats.
3111 </p>
3112 </dd>
3113 <dt class="hdlist1">
3114 <code>EMAIL</code>
3115 </dt>
3116 <dd>
3118 The email address used in the author and committer identities if no other
3119 relevant environment variable or configuration setting has been set.
3120 </p>
3121 </dd>
3122 </dl></div>
3123 </div>
3124 <div class="sect2">
3125 <h3 id="_git_diffs">Git Diffs</h3>
3126 <div class="dlist"><dl>
3127 <dt class="hdlist1">
3128 <code>GIT_DIFF_OPTS</code>
3129 </dt>
3130 <dd>
3132 Only valid setting is "--unified=??" or "-u??" to set the
3133 number of context lines shown when a unified diff is created.
3134 This takes precedence over any "-U" or "--unified" option
3135 value passed on the Git diff command line.
3136 </p>
3137 </dd>
3138 <dt class="hdlist1">
3139 <code>GIT_EXTERNAL_DIFF</code>
3140 </dt>
3141 <dd>
3143 When the environment variable <code>GIT_EXTERNAL_DIFF</code> is set, the
3144 program named by it is called to generate diffs, and Git
3145 does not use its builtin diff machinery.
3146 For a path that is added, removed, or modified,
3147 <code>GIT_EXTERNAL_DIFF</code> is called with 7 parameters:
3148 </p>
3149 <div class="literalblock">
3150 <div class="content">
3151 <pre><code>path old-file old-hex old-mode new-file new-hex new-mode</code></pre>
3152 </div></div>
3153 <div class="paragraph"><p>where:</p></div>
3154 </dd>
3155 <dt class="hdlist1">
3156 &lt;old|new&gt;-file
3157 </dt>
3158 <dd>
3160 are files GIT_EXTERNAL_DIFF can use to read the
3161 contents of &lt;old|new&gt;,
3162 </p>
3163 </dd>
3164 <dt class="hdlist1">
3165 &lt;old|new&gt;-hex
3166 </dt>
3167 <dd>
3169 are the 40-hexdigit SHA-1 hashes,
3170 </p>
3171 </dd>
3172 <dt class="hdlist1">
3173 &lt;old|new&gt;-mode
3174 </dt>
3175 <dd>
3177 are the octal representation of the file modes.
3178 </p>
3179 <div class="paragraph"><p>The file parameters can point at the user&#8217;s working file
3180 (e.g. <code>new-file</code> in "git-diff-files"), <code>/dev/null</code> (e.g. <code>old-file</code>
3181 when a new file is added), or a temporary file (e.g. <code>old-file</code> in the
3182 index). <code>GIT_EXTERNAL_DIFF</code> should not worry about unlinking the
3183 temporary file&#8201;&#8212;&#8201;it is removed when <code>GIT_EXTERNAL_DIFF</code> exits.</p></div>
3184 <div class="paragraph"><p>For a path that is unmerged, <code>GIT_EXTERNAL_DIFF</code> is called with 1
3185 parameter, &lt;path&gt;.</p></div>
3186 <div class="paragraph"><p>For each path <code>GIT_EXTERNAL_DIFF</code> is called, two environment variables,
3187 <code>GIT_DIFF_PATH_COUNTER</code> and <code>GIT_DIFF_PATH_TOTAL</code> are set.</p></div>
3188 </dd>
3189 <dt class="hdlist1">
3190 <code>GIT_EXTERNAL_DIFF_TRUST_EXIT_CODE</code>
3191 </dt>
3192 <dd>
3194 If this Boolean environment variable is set to true then the
3195 <code>GIT_EXTERNAL_DIFF</code> command is expected to return exit code
3196 0 if it considers the input files to be equal or 1 if it
3197 considers them to be different, like <code>diff(1)</code>.
3198 If it is set to false, which is the default, then the command
3199 is expected to return exit code 0 regardless of equality.
3200 Any other exit code causes Git to report a fatal error.
3201 </p>
3202 </dd>
3203 <dt class="hdlist1">
3204 <code>GIT_DIFF_PATH_COUNTER</code>
3205 </dt>
3206 <dd>
3208 A 1-based counter incremented by one for every path.
3209 </p>
3210 </dd>
3211 <dt class="hdlist1">
3212 <code>GIT_DIFF_PATH_TOTAL</code>
3213 </dt>
3214 <dd>
3216 The total number of paths.
3217 </p>
3218 </dd>
3219 </dl></div>
3220 </div>
3221 <div class="sect2">
3222 <h3 id="_other">other</h3>
3223 <div class="dlist"><dl>
3224 <dt class="hdlist1">
3225 <code>GIT_MERGE_VERBOSITY</code>
3226 </dt>
3227 <dd>
3229 A number controlling the amount of output shown by
3230 the recursive merge strategy. Overrides merge.verbosity.
3231 See <a href="git-merge.html">git-merge(1)</a>
3232 </p>
3233 </dd>
3234 <dt class="hdlist1">
3235 <code>GIT_PAGER</code>
3236 </dt>
3237 <dd>
3239 This environment variable overrides <code>$PAGER</code>. If it is set
3240 to an empty string or to the value "cat", Git will not launch
3241 a pager. See also the <code>core.pager</code> option in
3242 <a href="git-config.html">git-config(1)</a>.
3243 </p>
3244 </dd>
3245 <dt class="hdlist1">
3246 <code>GIT_PROGRESS_DELAY</code>
3247 </dt>
3248 <dd>
3250 A number controlling how many seconds to delay before showing
3251 optional progress indicators. Defaults to 2.
3252 </p>
3253 </dd>
3254 <dt class="hdlist1">
3255 <code>GIT_EDITOR</code>
3256 </dt>
3257 <dd>
3259 This environment variable overrides <code>$EDITOR</code> and <code>$VISUAL</code>.
3260 It is used by several Git commands when, on interactive mode,
3261 an editor is to be launched. See also <a href="git-var.html">git-var(1)</a>
3262 and the <code>core.editor</code> option in <a href="git-config.html">git-config(1)</a>.
3263 </p>
3264 </dd>
3265 <dt class="hdlist1">
3266 <code>GIT_SEQUENCE_EDITOR</code>
3267 </dt>
3268 <dd>
3270 This environment variable overrides the configured Git editor
3271 when editing the todo list of an interactive rebase. See also
3272 <a href="git-rebase.html">git-rebase(1)</a> and the <code>sequence.editor</code> option in
3273 <a href="git-config.html">git-config(1)</a>.
3274 </p>
3275 </dd>
3276 <dt class="hdlist1">
3277 <code>GIT_SSH</code>
3278 </dt>
3279 <dt class="hdlist1">
3280 <code>GIT_SSH_COMMAND</code>
3281 </dt>
3282 <dd>
3284 If either of these environment variables is set then <em>git fetch</em>
3285 and <em>git push</em> will use the specified command instead of <em>ssh</em>
3286 when they need to connect to a remote system.
3287 The command-line parameters passed to the configured command are
3288 determined by the ssh variant. See <code>ssh.variant</code> option in
3289 <a href="git-config.html">git-config(1)</a> for details.
3290 </p>
3291 <div class="paragraph"><p><code>$GIT_SSH_COMMAND</code> takes precedence over <code>$GIT_SSH</code>, and is interpreted
3292 by the shell, which allows additional arguments to be included.
3293 <code>$GIT_SSH</code> on the other hand must be just the path to a program
3294 (which can be a wrapper shell script, if additional arguments are
3295 needed).</p></div>
3296 <div class="paragraph"><p>Usually it is easier to configure any desired options through your
3297 personal <code>.ssh/config</code> file. Please consult your ssh documentation
3298 for further details.</p></div>
3299 </dd>
3300 <dt class="hdlist1">
3301 <code>GIT_SSH_VARIANT</code>
3302 </dt>
3303 <dd>
3305 If this environment variable is set, it overrides Git&#8217;s autodetection
3306 whether <code>GIT_SSH</code>/<code>GIT_SSH_COMMAND</code>/<code>core.sshCommand</code> refer to OpenSSH,
3307 plink or tortoiseplink. This variable overrides the config setting
3308 <code>ssh.variant</code> that serves the same purpose.
3309 </p>
3310 </dd>
3311 <dt class="hdlist1">
3312 <code>GIT_SSL_NO_VERIFY</code>
3313 </dt>
3314 <dd>
3316 Setting and exporting this environment variable to any value
3317 tells Git not to verify the SSL certificate when fetching or
3318 pushing over HTTPS.
3319 </p>
3320 </dd>
3321 <dt class="hdlist1">
3322 <code>GIT_ATTR_SOURCE</code>
3323 </dt>
3324 <dd>
3326 Sets the treeish that gitattributes will be read from.
3327 </p>
3328 </dd>
3329 <dt class="hdlist1">
3330 <code>GIT_ASKPASS</code>
3331 </dt>
3332 <dd>
3334 If this environment variable is set, then Git commands which need to
3335 acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
3336 will call this program with a suitable prompt as command-line argument
3337 and read the password from its STDOUT. See also the <code>core.askPass</code>
3338 option in <a href="git-config.html">git-config(1)</a>.
3339 </p>
3340 </dd>
3341 <dt class="hdlist1">
3342 <code>GIT_TERMINAL_PROMPT</code>
3343 </dt>
3344 <dd>
3346 If this Boolean environment variable is set to false, git will not prompt
3347 on the terminal (e.g., when asking for HTTP authentication).
3348 </p>
3349 </dd>
3350 <dt class="hdlist1">
3351 <code>GIT_CONFIG_GLOBAL</code>
3352 </dt>
3353 <dt class="hdlist1">
3354 <code>GIT_CONFIG_SYSTEM</code>
3355 </dt>
3356 <dd>
3358 Take the configuration from the given files instead from global or
3359 system-level configuration files. If <code>GIT_CONFIG_SYSTEM</code> is set, the
3360 system config file defined at build time (usually <code>/etc/gitconfig</code>)
3361 will not be read. Likewise, if <code>GIT_CONFIG_GLOBAL</code> is set, neither
3362 <code>$HOME/.gitconfig</code> nor <code>$XDG_CONFIG_HOME/git/config</code> will be read. Can
3363 be set to <code>/dev/null</code> to skip reading configuration files of the
3364 respective level.
3365 </p>
3366 </dd>
3367 <dt class="hdlist1">
3368 <code>GIT_CONFIG_NOSYSTEM</code>
3369 </dt>
3370 <dd>
3372 Whether to skip reading settings from the system-wide
3373 <code>$(prefix)/etc/gitconfig</code> file. This Boolean environment variable can
3374 be used along with <code>$HOME</code> and <code>$XDG_CONFIG_HOME</code> to create a
3375 predictable environment for a picky script, or you can set it
3376 to true to temporarily avoid using a buggy <code>/etc/gitconfig</code> file while
3377 waiting for someone with sufficient permissions to fix it.
3378 </p>
3379 </dd>
3380 <dt class="hdlist1">
3381 <code>GIT_FLUSH</code>
3382 </dt>
3383 <dd>
3385 If this Boolean environment variable is set to true, then commands such
3386 as <em>git blame</em> (in incremental mode), <em>git rev-list</em>, <em>git log</em>,
3387 <em>git check-attr</em> and <em>git check-ignore</em> will
3388 force a flush of the output stream after each record have been
3389 flushed. If this
3390 variable is set to false, the output of these commands will be done
3391 using completely buffered I/O. If this environment variable is
3392 not set, Git will choose buffered or record-oriented flushing
3393 based on whether stdout appears to be redirected to a file or not.
3394 </p>
3395 </dd>
3396 <dt class="hdlist1">
3397 <code>GIT_TRACE</code>
3398 </dt>
3399 <dd>
3401 Enables general trace messages, e.g. alias expansion, built-in
3402 command execution and external command execution.
3403 </p>
3404 <div class="paragraph"><p>If this variable is set to "1", "2" or "true" (comparison
3405 is case insensitive), trace messages will be printed to
3406 stderr.</p></div>
3407 <div class="paragraph"><p>If the variable is set to an integer value greater than 2
3408 and lower than 10 (strictly) then Git will interpret this
3409 value as an open file descriptor and will try to write the
3410 trace messages into this file descriptor.</p></div>
3411 <div class="paragraph"><p>Alternatively, if the variable is set to an absolute path
3412 (starting with a <em>/</em> character), Git will interpret this
3413 as a file path and will try to append the trace messages
3414 to it.</p></div>
3415 <div class="paragraph"><p>Unsetting the variable, or setting it to empty, "0" or
3416 "false" (case insensitive) disables trace messages.</p></div>
3417 </dd>
3418 <dt class="hdlist1">
3419 <code>GIT_TRACE_FSMONITOR</code>
3420 </dt>
3421 <dd>
3423 Enables trace messages for the filesystem monitor extension.
3424 See <code>GIT_TRACE</code> for available trace output options.
3425 </p>
3426 </dd>
3427 <dt class="hdlist1">
3428 <code>GIT_TRACE_PACK_ACCESS</code>
3429 </dt>
3430 <dd>
3432 Enables trace messages for all accesses to any packs. For each
3433 access, the pack file name and an offset in the pack is
3434 recorded. This may be helpful for troubleshooting some
3435 pack-related performance problems.
3436 See <code>GIT_TRACE</code> for available trace output options.
3437 </p>
3438 </dd>
3439 <dt class="hdlist1">
3440 <code>GIT_TRACE_PACKET</code>
3441 </dt>
3442 <dd>
3444 Enables trace messages for all packets coming in or out of a
3445 given program. This can help with debugging object negotiation
3446 or other protocol issues. Tracing is turned off at a packet
3447 starting with "PACK" (but see <code>GIT_TRACE_PACKFILE</code> below).
3448 See <code>GIT_TRACE</code> for available trace output options.
3449 </p>
3450 </dd>
3451 <dt class="hdlist1">
3452 <code>GIT_TRACE_PACKFILE</code>
3453 </dt>
3454 <dd>
3456 Enables tracing of packfiles sent or received by a
3457 given program. Unlike other trace output, this trace is
3458 verbatim: no headers, and no quoting of binary data. You almost
3459 certainly want to direct into a file (e.g.,
3460 <code>GIT_TRACE_PACKFILE=/tmp/my.pack</code>) rather than displaying it on
3461 the terminal or mixing it with other trace output.
3462 </p>
3463 <div class="paragraph"><p>Note that this is currently only implemented for the client side
3464 of clones and fetches.</p></div>
3465 </dd>
3466 <dt class="hdlist1">
3467 <code>GIT_TRACE_PERFORMANCE</code>
3468 </dt>
3469 <dd>
3471 Enables performance related trace messages, e.g. total execution
3472 time of each Git command.
3473 See <code>GIT_TRACE</code> for available trace output options.
3474 </p>
3475 </dd>
3476 <dt class="hdlist1">
3477 <code>GIT_TRACE_REFS</code>
3478 </dt>
3479 <dd>
3481 Enables trace messages for operations on the ref database.
3482 See <code>GIT_TRACE</code> for available trace output options.
3483 </p>
3484 </dd>
3485 <dt class="hdlist1">
3486 <code>GIT_TRACE_SETUP</code>
3487 </dt>
3488 <dd>
3490 Enables trace messages printing the .git, working tree and current
3491 working directory after Git has completed its setup phase.
3492 See <code>GIT_TRACE</code> for available trace output options.
3493 </p>
3494 </dd>
3495 <dt class="hdlist1">
3496 <code>GIT_TRACE_SHALLOW</code>
3497 </dt>
3498 <dd>
3500 Enables trace messages that can help debugging fetching /
3501 cloning of shallow repositories.
3502 See <code>GIT_TRACE</code> for available trace output options.
3503 </p>
3504 </dd>
3505 <dt class="hdlist1">
3506 <code>GIT_TRACE_CURL</code>
3507 </dt>
3508 <dd>
3510 Enables a curl full trace dump of all incoming and outgoing data,
3511 including descriptive information, of the git transport protocol.
3512 This is similar to doing curl <code>--trace-ascii</code> on the command line.
3513 See <code>GIT_TRACE</code> for available trace output options.
3514 </p>
3515 </dd>
3516 <dt class="hdlist1">
3517 <code>GIT_TRACE_CURL_NO_DATA</code>
3518 </dt>
3519 <dd>
3521 When a curl trace is enabled (see <code>GIT_TRACE_CURL</code> above), do not dump
3522 data (that is, only dump info lines and headers).
3523 </p>
3524 </dd>
3525 <dt class="hdlist1">
3526 <code>GIT_TRACE2</code>
3527 </dt>
3528 <dd>
3530 Enables more detailed trace messages from the "trace2" library.
3531 Output from <code>GIT_TRACE2</code> is a simple text-based format for human
3532 readability.
3533 </p>
3534 <div class="paragraph"><p>If this variable is set to "1", "2" or "true" (comparison
3535 is case insensitive), trace messages will be printed to
3536 stderr.</p></div>
3537 <div class="paragraph"><p>If the variable is set to an integer value greater than 2
3538 and lower than 10 (strictly) then Git will interpret this
3539 value as an open file descriptor and will try to write the
3540 trace messages into this file descriptor.</p></div>
3541 <div class="paragraph"><p>Alternatively, if the variable is set to an absolute path
3542 (starting with a <em>/</em> character), Git will interpret this
3543 as a file path and will try to append the trace messages
3544 to it. If the path already exists and is a directory, the
3545 trace messages will be written to files (one per process)
3546 in that directory, named according to the last component
3547 of the SID and an optional counter (to avoid filename
3548 collisions).</p></div>
3549 <div class="paragraph"><p>In addition, if the variable is set to
3550 <code>af_unix:[&lt;socket-type&gt;:]&lt;absolute-pathname&gt;</code>, Git will try
3551 to open the path as a Unix Domain Socket. The socket type
3552 can be either <code>stream</code> or <code>dgram</code>.</p></div>
3553 <div class="paragraph"><p>Unsetting the variable, or setting it to empty, "0" or
3554 "false" (case insensitive) disables trace messages.</p></div>
3555 <div class="paragraph"><p>See <a href="technical/api-trace2.html">Trace2 documentation</a>
3556 for full details.</p></div>
3557 </dd>
3558 <dt class="hdlist1">
3559 <code>GIT_TRACE2_EVENT</code>
3560 </dt>
3561 <dd>
3563 This setting writes a JSON-based format that is suited for machine
3564 interpretation.
3565 See <code>GIT_TRACE2</code> for available trace output options and
3566 <a href="technical/api-trace2.html">Trace2 documentation</a> for full details.
3567 </p>
3568 </dd>
3569 <dt class="hdlist1">
3570 <code>GIT_TRACE2_PERF</code>
3571 </dt>
3572 <dd>
3574 In addition to the text-based messages available in <code>GIT_TRACE2</code>, this
3575 setting writes a column-based format for understanding nesting
3576 regions.
3577 See <code>GIT_TRACE2</code> for available trace output options and
3578 <a href="technical/api-trace2.html">Trace2 documentation</a> for full details.
3579 </p>
3580 </dd>
3581 <dt class="hdlist1">
3582 <code>GIT_TRACE_REDACT</code>
3583 </dt>
3584 <dd>
3586 By default, when tracing is activated, Git redacts the values of
3587 cookies, the "Authorization:" header, the "Proxy-Authorization:"
3588 header and packfile URIs. Set this Boolean environment variable to false to prevent this
3589 redaction.
3590 </p>
3591 </dd>
3592 <dt class="hdlist1">
3593 <code>GIT_NO_REPLACE_OBJECTS</code>
3594 </dt>
3595 <dd>
3597 Setting and exporting this environment variable tells Git to
3598 ignore replacement refs and do not replace Git objects.
3599 </p>
3600 </dd>
3601 <dt class="hdlist1">
3602 <code>GIT_LITERAL_PATHSPECS</code>
3603 </dt>
3604 <dd>
3606 Setting this Boolean environment variable to true will cause Git to treat all
3607 pathspecs literally, rather than as glob patterns. For example,
3608 running <code>GIT_LITERAL_PATHSPECS=1 git log -- '*.c'</code> will search
3609 for commits that touch the path <code>*.c</code>, not any paths that the
3610 glob <code>*.c</code> matches. You might want this if you are feeding
3611 literal paths to Git (e.g., paths previously given to you by
3612 <code>git ls-tree</code>, <code>--raw</code> diff output, etc).
3613 </p>
3614 </dd>
3615 <dt class="hdlist1">
3616 <code>GIT_GLOB_PATHSPECS</code>
3617 </dt>
3618 <dd>
3620 Setting this Boolean environment variable to true will cause Git to treat all
3621 pathspecs as glob patterns (aka "glob" magic).
3622 </p>
3623 </dd>
3624 <dt class="hdlist1">
3625 <code>GIT_NOGLOB_PATHSPECS</code>
3626 </dt>
3627 <dd>
3629 Setting this Boolean environment variable to true will cause Git to treat all
3630 pathspecs as literal (aka "literal" magic).
3631 </p>
3632 </dd>
3633 <dt class="hdlist1">
3634 <code>GIT_ICASE_PATHSPECS</code>
3635 </dt>
3636 <dd>
3638 Setting this Boolean environment variable to true will cause Git to treat all
3639 pathspecs as case-insensitive.
3640 </p>
3641 </dd>
3642 <dt class="hdlist1">
3643 <code>GIT_NO_LAZY_FETCH</code>
3644 </dt>
3645 <dd>
3647 Setting this Boolean environment variable to true tells Git
3648 not to lazily fetch missing objects from the promisor remote
3649 on demand.
3650 </p>
3651 </dd>
3652 <dt class="hdlist1">
3653 <code>GIT_REFLOG_ACTION</code>
3654 </dt>
3655 <dd>
3657 When a ref is updated, reflog entries are created to keep
3658 track of the reason why the ref was updated (which is
3659 typically the name of the high-level command that updated
3660 the ref), in addition to the old and new values of the ref.
3661 A scripted Porcelain command can use set_reflog_action
3662 helper function in <code>git-sh-setup</code> to set its name to this
3663 variable when it is invoked as the top level command by the
3664 end user, to be recorded in the body of the reflog.
3665 </p>
3666 </dd>
3667 <dt class="hdlist1">
3668 <code>GIT_REF_PARANOIA</code>
3669 </dt>
3670 <dd>
3672 If this Boolean environment variable is set to false, ignore broken or badly named refs when iterating
3673 over lists of refs. Normally Git will try to include any such
3674 refs, which may cause some operations to fail. This is usually
3675 preferable, as potentially destructive operations (e.g.,
3676 <a href="git-prune.html">git-prune(1)</a>) are better off aborting rather than
3677 ignoring broken refs (and thus considering the history they
3678 point to as not worth saving). The default value is <code>1</code> (i.e.,
3679 be paranoid about detecting and aborting all operations). You
3680 should not normally need to set this to <code>0</code>, but it may be
3681 useful when trying to salvage data from a corrupted repository.
3682 </p>
3683 </dd>
3684 <dt class="hdlist1">
3685 <code>GIT_COMMIT_GRAPH_PARANOIA</code>
3686 </dt>
3687 <dd>
3689 When loading a commit object from the commit-graph, Git performs an
3690 existence check on the object in the object database. This is done to
3691 avoid issues with stale commit-graphs that contain references to
3692 already-deleted commits, but comes with a performance penalty.
3693 </p>
3694 <div class="paragraph"><p>The default is "false", which disables the aforementioned behavior.
3695 Setting this to "true" enables the existence check so that stale commits
3696 will never be returned from the commit-graph at the cost of performance.</p></div>
3697 </dd>
3698 <dt class="hdlist1">
3699 <code>GIT_ALLOW_PROTOCOL</code>
3700 </dt>
3701 <dd>
3703 If set to a colon-separated list of protocols, behave as if
3704 <code>protocol.allow</code> is set to <code>never</code>, and each of the listed
3705 protocols has <code>protocol.&lt;name&gt;.allow</code> set to <code>always</code>
3706 (overriding any existing configuration). See the description of
3707 <code>protocol.allow</code> in <a href="git-config.html">git-config(1)</a> for more details.
3708 </p>
3709 </dd>
3710 <dt class="hdlist1">
3711 <code>GIT_PROTOCOL_FROM_USER</code>
3712 </dt>
3713 <dd>
3715 Set this Boolean environment variable to false to prevent protocols used by fetch/push/clone which are
3716 configured to the <code>user</code> state. This is useful to restrict recursive
3717 submodule initialization from an untrusted repository or for programs
3718 which feed potentially-untrusted URLS to git commands. See
3719 <a href="git-config.html">git-config(1)</a> for more details.
3720 </p>
3721 </dd>
3722 <dt class="hdlist1">
3723 <code>GIT_PROTOCOL</code>
3724 </dt>
3725 <dd>
3727 For internal use only. Used in handshaking the wire protocol.
3728 Contains a colon <em>:</em> separated list of keys with optional values
3729 <em>&lt;key&gt;[=&lt;value&gt;]</em>. Presence of unknown keys and values must be
3730 ignored.
3731 </p>
3732 <div class="paragraph"><p>Note that servers may need to be configured to allow this variable to
3733 pass over some transports. It will be propagated automatically when
3734 accessing local repositories (i.e., <code>file://</code> or a filesystem path), as
3735 well as over the <code>git://</code> protocol. For git-over-http, it should work
3736 automatically in most configurations, but see the discussion in
3737 <a href="git-http-backend.html">git-http-backend(1)</a>. For git-over-ssh, the ssh server may need
3738 to be configured to allow clients to pass this variable (e.g., by using
3739 <code>AcceptEnv GIT_PROTOCOL</code> with OpenSSH).</p></div>
3740 <div class="paragraph"><p>This configuration is optional. If the variable is not propagated, then
3741 clients will fall back to the original "v0" protocol (but may miss out
3742 on some performance improvements or features). This variable currently
3743 only affects clones and fetches; it is not yet used for pushes (but may
3744 be in the future).</p></div>
3745 </dd>
3746 <dt class="hdlist1">
3747 <code>GIT_OPTIONAL_LOCKS</code>
3748 </dt>
3749 <dd>
3751 If this Boolean environment variable is set to false, Git will complete any requested operation without
3752 performing any optional sub-operations that require taking a lock.
3753 For example, this will prevent <code>git status</code> from refreshing the
3754 index as a side effect. This is useful for processes running in
3755 the background which do not want to cause lock contention with
3756 other operations on the repository. Defaults to <code>1</code>.
3757 </p>
3758 </dd>
3759 <dt class="hdlist1">
3760 <code>GIT_REDIRECT_STDIN</code>
3761 </dt>
3762 <dt class="hdlist1">
3763 <code>GIT_REDIRECT_STDOUT</code>
3764 </dt>
3765 <dt class="hdlist1">
3766 <code>GIT_REDIRECT_STDERR</code>
3767 </dt>
3768 <dd>
3770 Windows-only: allow redirecting the standard input/output/error
3771 handles to paths specified by the environment variables. This is
3772 particularly useful in multi-threaded applications where the
3773 canonical way to pass standard handles via <code>CreateProcess()</code> is
3774 not an option because it would require the handles to be marked
3775 inheritable (and consequently <strong>every</strong> spawned process would
3776 inherit them, possibly blocking regular Git operations). The
3777 primary intended use case is to use named pipes for communication
3778 (e.g. <code>\\.\pipe\my-git-stdin-123</code>).
3779 </p>
3780 <div class="paragraph"><p>Two special values are supported: <code>off</code> will simply close the
3781 corresponding standard handle, and if <code>GIT_REDIRECT_STDERR</code> is
3782 <code>2&gt;&amp;1</code>, standard error will be redirected to the same handle as
3783 standard output.</p></div>
3784 </dd>
3785 <dt class="hdlist1">
3786 <code>GIT_PRINT_SHA1_ELLIPSIS</code> (deprecated)
3787 </dt>
3788 <dd>
3790 If set to <code>yes</code>, print an ellipsis following an
3791 (abbreviated) SHA-1 value. This affects indications of
3792 detached HEADs (<a href="git-checkout.html">git-checkout(1)</a>) and the raw
3793 diff output (<a href="git-diff.html">git-diff(1)</a>). Printing an
3794 ellipsis in the cases mentioned is no longer considered
3795 adequate and support for it is likely to be removed in the
3796 foreseeable future (along with the variable).
3797 </p>
3798 </dd>
3799 </dl></div>
3800 </div>
3801 </div>
3802 </div>
3803 <div class="sect1">
3804 <h2 id="_discussion_a_id_discussion_a">Discussion<a id="Discussion"></a></h2>
3805 <div class="sectionbody">
3806 <div class="paragraph"><p>More detail on the following is available from the
3807 <a href="user-manual.html#git-concepts">Git concepts chapter of the
3808 user-manual</a> and <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>.</p></div>
3809 <div class="paragraph"><p>A Git project normally consists of a working directory with a ".git"
3810 subdirectory at the top level. The .git directory contains, among other
3811 things, a compressed object database representing the complete history
3812 of the project, an "index" file which links that history to the current
3813 contents of the working tree, and named pointers into that history such
3814 as tags and branch heads.</p></div>
3815 <div class="paragraph"><p>The object database contains objects of three main types: blobs, which
3816 hold file data; trees, which point to blobs and other trees to build up
3817 directory hierarchies; and commits, which each reference a single tree
3818 and some number of parent commits.</p></div>
3819 <div class="paragraph"><p>The commit, equivalent to what other systems call a "changeset" or
3820 "version", represents a step in the project&#8217;s history, and each parent
3821 represents an immediately preceding step. Commits with more than one
3822 parent represent merges of independent lines of development.</p></div>
3823 <div class="paragraph"><p>All objects are named by the SHA-1 hash of their contents, normally
3824 written as a string of 40 hex digits. Such names are globally unique.
3825 The entire history leading up to a commit can be vouched for by signing
3826 just that commit. A fourth object type, the tag, is provided for this
3827 purpose.</p></div>
3828 <div class="paragraph"><p>When first created, objects are stored in individual files, but for
3829 efficiency may later be compressed together into "pack files".</p></div>
3830 <div class="paragraph"><p>Named pointers called refs mark interesting points in history. A ref
3831 may contain the SHA-1 name of an object or the name of another ref (the
3832 latter is called a "symbolic ref").
3833 Refs with names beginning <code>refs/head/</code> contain the SHA-1 name of the most
3834 recent commit (or "head") of a branch under development. SHA-1 names of
3835 tags of interest are stored under <code>refs/tags/</code>. A symbolic ref named
3836 <code>HEAD</code> contains the name of the currently checked-out branch.</p></div>
3837 <div class="paragraph"><p>The index file is initialized with a list of all paths and, for each
3838 path, a blob object and a set of attributes. The blob object represents
3839 the contents of the file as of the head of the current branch. The
3840 attributes (last modified time, size, etc.) are taken from the
3841 corresponding file in the working tree. Subsequent changes to the
3842 working tree can be found by comparing these attributes. The index may
3843 be updated with new content, and new commits may be created from the
3844 content stored in the index.</p></div>
3845 <div class="paragraph"><p>The index is also capable of storing multiple entries (called "stages")
3846 for a given pathname. These stages are used to hold the various
3847 unmerged version of a file when a merge is in progress.</p></div>
3848 </div>
3849 </div>
3850 <div class="sect1">
3851 <h2 id="_security">SECURITY</h2>
3852 <div class="sectionbody">
3853 <div class="paragraph"><p>Some configuration options and hook files may cause Git to run arbitrary
3854 shell commands. Because configuration and hooks are not copied using
3855 <code>git clone</code>, it is generally safe to clone remote repositories with
3856 untrusted content, inspect them with <code>git log</code>, and so on.</p></div>
3857 <div class="paragraph"><p>However, it is not safe to run Git commands in a <code>.git</code> directory (or
3858 the working tree that surrounds it) when that <code>.git</code> directory itself
3859 comes from an untrusted source. The commands in its config and hooks
3860 are executed in the usual way.</p></div>
3861 <div class="paragraph"><p>By default, Git will refuse to run when the repository is owned by
3862 someone other than the user running the command. See the entry for
3863 <code>safe.directory</code> in <a href="git-config.html">git-config(1)</a>. While this can help protect
3864 you in a multi-user environment, note that you can also acquire
3865 untrusted repositories that are owned by you (for example, if you
3866 extract a zip file or tarball from an untrusted source). In such cases,
3867 you&#8217;d need to "sanitize" the untrusted repository first.</p></div>
3868 <div class="paragraph"><p>If you have an untrusted <code>.git</code> directory, you should first clone it
3869 with <code>git clone --no-local</code> to obtain a clean copy. Git does restrict
3870 the set of options and hooks that will be run by <code>upload-pack</code>, which
3871 handles the server side of a clone or fetch, but beware that the
3872 surface area for attack against <code>upload-pack</code> is large, so this does
3873 carry some risk. The safest thing is to serve the repository as an
3874 unprivileged user (either via <a href="git-daemon.html">git-daemon(1)</a>, ssh, or using
3875 other tools to change user ids). See the discussion in the <code>SECURITY</code>
3876 section of <a href="git-upload-pack.html">git-upload-pack(1)</a>.</p></div>
3877 </div>
3878 </div>
3879 <div class="sect1">
3880 <h2 id="_further_documentation">FURTHER DOCUMENTATION</h2>
3881 <div class="sectionbody">
3882 <div class="paragraph"><p>See the references in the "description" section to get started
3883 using Git. The following is probably more detail than necessary
3884 for a first-time user.</p></div>
3885 <div class="paragraph"><p>The <a href="user-manual.html#git-concepts">Git concepts chapter of the
3886 user-manual</a> and <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a> both provide
3887 introductions to the underlying Git architecture.</p></div>
3888 <div class="paragraph"><p>See <a href="gitworkflows.html">gitworkflows(7)</a> for an overview of recommended workflows.</p></div>
3889 <div class="paragraph"><p>See also the <a href="howto-index.html">howto</a> documents for some useful
3890 examples.</p></div>
3891 <div class="paragraph"><p>The internals are documented in the
3892 <a href="technical/api-index.html">Git API documentation</a>.</p></div>
3893 <div class="paragraph"><p>Users migrating from CVS may also want to
3894 read <a href="gitcvs-migration.html">gitcvs-migration(7)</a>.</p></div>
3895 </div>
3896 </div>
3897 <div class="sect1">
3898 <h2 id="_authors">Authors</h2>
3899 <div class="sectionbody">
3900 <div class="paragraph"><p>Git was started by Linus Torvalds, and is currently maintained by Junio
3901 C Hamano. Numerous contributions have come from the Git mailing list
3902 &lt;<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>&gt;. <a href="https://openhub.net/p/git/contributors/summary">https://openhub.net/p/git/contributors/summary</a>
3903 gives you a more complete list of contributors.</p></div>
3904 <div class="paragraph"><p>If you have a clone of git.git itself, the
3905 output of <a href="git-shortlog.html">git-shortlog(1)</a> and <a href="git-blame.html">git-blame(1)</a> can show you
3906 the authors for specific parts of the project.</p></div>
3907 </div>
3908 </div>
3909 <div class="sect1">
3910 <h2 id="_reporting_bugs">Reporting Bugs</h2>
3911 <div class="sectionbody">
3912 <div class="paragraph"><p>Report bugs to the Git mailing list &lt;<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>&gt; where the
3913 development and maintenance is primarily done. You do not have to be
3914 subscribed to the list to send a message there. See the list archive
3915 at <a href="https://lore.kernel.org/git">https://lore.kernel.org/git</a> for previous bug reports and other
3916 discussions.</p></div>
3917 <div class="paragraph"><p>Issues which are security relevant should be disclosed privately to
3918 the Git Security mailing list &lt;<a href="mailto:git-security@googlegroups.com">git-security@googlegroups.com</a>&gt;.</p></div>
3919 </div>
3920 </div>
3921 <div class="sect1">
3922 <h2 id="_see_also">SEE ALSO</h2>
3923 <div class="sectionbody">
3924 <div class="paragraph"><p><a href="gittutorial.html">gittutorial(7)</a>, <a href="gittutorial-2.html">gittutorial-2(7)</a>,
3925 <a href="giteveryday.html">giteveryday(7)</a>, <a href="gitcvs-migration.html">gitcvs-migration(7)</a>,
3926 <a href="gitglossary.html">gitglossary(7)</a>, <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>,
3927 <a href="gitcli.html">gitcli(7)</a>, <a href="user-manual.html">The Git User&#8217;s Manual</a>,
3928 <a href="gitworkflows.html">gitworkflows(7)</a></p></div>
3929 </div>
3930 </div>
3931 <div class="sect1">
3932 <h2 id="_git">GIT</h2>
3933 <div class="sectionbody">
3934 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
3935 </div>
3936 </div>
3937 </div>
3938 <div id="footnotes"><hr /></div>
3939 <div id="footer">
3940 <div id="footer-text">
3941 Last updated
3942 2024-06-20 16:27:24 PDT
3943 </div>
3944 </div>
3945 </body>
3946 </html>