Autogenerated HTML docs for v2.45.1-204-gd8ab1
[git-htmldocs.git] / git.html
blob795c01266fc63ef8ee2f699d28559fea15acb82e
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-remote.html">git-remote(1)</a>
1545 </dt>
1546 <dd>
1548 Manage set of tracked repositories.
1549 </p>
1550 </dd>
1551 <dt class="hdlist1">
1552 <a href="git-repack.html">git-repack(1)</a>
1553 </dt>
1554 <dd>
1556 Pack unpacked objects in a repository.
1557 </p>
1558 </dd>
1559 <dt class="hdlist1">
1560 <a href="git-replace.html">git-replace(1)</a>
1561 </dt>
1562 <dd>
1564 Create, list, delete refs to replace objects.
1565 </p>
1566 </dd>
1567 </dl></div>
1568 <div class="paragraph"><p>Interrogators:</p></div>
1569 <div class="dlist"><dl>
1570 <dt class="hdlist1">
1571 <a href="git-annotate.html">git-annotate(1)</a>
1572 </dt>
1573 <dd>
1575 Annotate file lines with commit information.
1576 </p>
1577 </dd>
1578 <dt class="hdlist1">
1579 <a href="git-blame.html">git-blame(1)</a>
1580 </dt>
1581 <dd>
1583 Show what revision and author last modified each line of a file.
1584 </p>
1585 </dd>
1586 <dt class="hdlist1">
1587 <a href="git-bugreport.html">git-bugreport(1)</a>
1588 </dt>
1589 <dd>
1591 Collect information for user to file a bug report.
1592 </p>
1593 </dd>
1594 <dt class="hdlist1">
1595 <a href="git-count-objects.html">git-count-objects(1)</a>
1596 </dt>
1597 <dd>
1599 Count unpacked number of objects and their disk consumption.
1600 </p>
1601 </dd>
1602 <dt class="hdlist1">
1603 <a href="git-diagnose.html">git-diagnose(1)</a>
1604 </dt>
1605 <dd>
1607 Generate a zip archive of diagnostic information.
1608 </p>
1609 </dd>
1610 <dt class="hdlist1">
1611 <a href="git-difftool.html">git-difftool(1)</a>
1612 </dt>
1613 <dd>
1615 Show changes using common diff tools.
1616 </p>
1617 </dd>
1618 <dt class="hdlist1">
1619 <a href="git-fsck.html">git-fsck(1)</a>
1620 </dt>
1621 <dd>
1623 Verifies the connectivity and validity of the objects in the database.
1624 </p>
1625 </dd>
1626 <dt class="hdlist1">
1627 <a href="git-help.html">git-help(1)</a>
1628 </dt>
1629 <dd>
1631 Display help information about Git.
1632 </p>
1633 </dd>
1634 <dt class="hdlist1">
1635 <a href="git-instaweb.html">git-instaweb(1)</a>
1636 </dt>
1637 <dd>
1639 Instantly browse your working repository in gitweb.
1640 </p>
1641 </dd>
1642 <dt class="hdlist1">
1643 <a href="git-merge-tree.html">git-merge-tree(1)</a>
1644 </dt>
1645 <dd>
1647 Perform merge without touching index or working tree.
1648 </p>
1649 </dd>
1650 <dt class="hdlist1">
1651 <a href="git-rerere.html">git-rerere(1)</a>
1652 </dt>
1653 <dd>
1655 Reuse recorded resolution of conflicted merges.
1656 </p>
1657 </dd>
1658 <dt class="hdlist1">
1659 <a href="git-show-branch.html">git-show-branch(1)</a>
1660 </dt>
1661 <dd>
1663 Show branches and their commits.
1664 </p>
1665 </dd>
1666 <dt class="hdlist1">
1667 <a href="git-verify-commit.html">git-verify-commit(1)</a>
1668 </dt>
1669 <dd>
1671 Check the GPG signature of commits.
1672 </p>
1673 </dd>
1674 <dt class="hdlist1">
1675 <a href="git-verify-tag.html">git-verify-tag(1)</a>
1676 </dt>
1677 <dd>
1679 Check the GPG signature of tags.
1680 </p>
1681 </dd>
1682 <dt class="hdlist1">
1683 <a href="git-version.html">git-version(1)</a>
1684 </dt>
1685 <dd>
1687 Display version information about Git.
1688 </p>
1689 </dd>
1690 <dt class="hdlist1">
1691 <a href="git-whatchanged.html">git-whatchanged(1)</a>
1692 </dt>
1693 <dd>
1695 Show logs with differences each commit introduces.
1696 </p>
1697 </dd>
1698 <dt class="hdlist1">
1699 <a href="gitweb.html">gitweb(1)</a>
1700 </dt>
1701 <dd>
1703 Git web interface (web frontend to Git repositories).
1704 </p>
1705 </dd>
1706 </dl></div>
1707 </div>
1708 <div class="sect2">
1709 <h3 id="_interacting_with_others">Interacting with Others</h3>
1710 <div class="paragraph"><p>These commands are to interact with foreign SCM and with other
1711 people via patch over e-mail.</p></div>
1712 <div class="dlist"><dl>
1713 <dt class="hdlist1">
1714 <a href="git-archimport.html">git-archimport(1)</a>
1715 </dt>
1716 <dd>
1718 Import a GNU Arch repository into Git.
1719 </p>
1720 </dd>
1721 <dt class="hdlist1">
1722 <a href="git-cvsexportcommit.html">git-cvsexportcommit(1)</a>
1723 </dt>
1724 <dd>
1726 Export a single commit to a CVS checkout.
1727 </p>
1728 </dd>
1729 <dt class="hdlist1">
1730 <a href="git-cvsimport.html">git-cvsimport(1)</a>
1731 </dt>
1732 <dd>
1734 Salvage your data out of another SCM people love to hate.
1735 </p>
1736 </dd>
1737 <dt class="hdlist1">
1738 <a href="git-cvsserver.html">git-cvsserver(1)</a>
1739 </dt>
1740 <dd>
1742 A CVS server emulator for Git.
1743 </p>
1744 </dd>
1745 <dt class="hdlist1">
1746 <a href="git-imap-send.html">git-imap-send(1)</a>
1747 </dt>
1748 <dd>
1750 Send a collection of patches from stdin to an IMAP folder.
1751 </p>
1752 </dd>
1753 <dt class="hdlist1">
1754 <a href="git-p4.html">git-p4(1)</a>
1755 </dt>
1756 <dd>
1758 Import from and submit to Perforce repositories.
1759 </p>
1760 </dd>
1761 <dt class="hdlist1">
1762 <a href="git-quiltimport.html">git-quiltimport(1)</a>
1763 </dt>
1764 <dd>
1766 Applies a quilt patchset onto the current branch.
1767 </p>
1768 </dd>
1769 <dt class="hdlist1">
1770 <a href="git-request-pull.html">git-request-pull(1)</a>
1771 </dt>
1772 <dd>
1774 Generates a summary of pending changes.
1775 </p>
1776 </dd>
1777 <dt class="hdlist1">
1778 <a href="git-send-email.html">git-send-email(1)</a>
1779 </dt>
1780 <dd>
1782 Send a collection of patches as emails.
1783 </p>
1784 </dd>
1785 <dt class="hdlist1">
1786 <a href="git-svn.html">git-svn(1)</a>
1787 </dt>
1788 <dd>
1790 Bidirectional operation between a Subversion repository and Git.
1791 </p>
1792 </dd>
1793 </dl></div>
1794 </div>
1795 <div class="sect2">
1796 <h3 id="_reset_restore_and_revert">Reset, restore and revert</h3>
1797 <div class="paragraph"><p>There are three commands with similar names: <code>git reset</code>,
1798 <code>git restore</code> and <code>git revert</code>.</p></div>
1799 <div class="ulist"><ul>
1800 <li>
1802 <a href="git-revert.html">git-revert(1)</a> is about making a new commit that reverts the
1803 changes made by other commits.
1804 </p>
1805 </li>
1806 <li>
1808 <a href="git-restore.html">git-restore(1)</a> is about restoring files in the working tree
1809 from either the index or another commit. This command does not
1810 update your branch. The command can also be used to restore files in
1811 the index from another commit.
1812 </p>
1813 </li>
1814 <li>
1816 <a href="git-reset.html">git-reset(1)</a> is about updating your branch, moving the tip
1817 in order to add or remove commits from the branch. This operation
1818 changes the commit history.
1819 </p>
1820 <div class="paragraph"><p><code>git reset</code> can also be used to restore the index, overlapping with
1821 <code>git restore</code>.</p></div>
1822 </li>
1823 </ul></div>
1824 </div>
1825 </div>
1826 </div>
1827 <div class="sect1">
1828 <h2 id="_low_level_commands_plumbing">Low-level commands (plumbing)</h2>
1829 <div class="sectionbody">
1830 <div class="paragraph"><p>Although Git includes its
1831 own porcelain layer, its low-level commands are sufficient to support
1832 development of alternative porcelains. Developers of such porcelains
1833 might start by reading about <a href="git-update-index.html">git-update-index(1)</a> and
1834 <a href="git-read-tree.html">git-read-tree(1)</a>.</p></div>
1835 <div class="paragraph"><p>The interface (input, output, set of options and the semantics)
1836 to these low-level commands are meant to be a lot more stable
1837 than Porcelain level commands, because these commands are
1838 primarily for scripted use. The interface to Porcelain commands
1839 on the other hand are subject to change in order to improve the
1840 end user experience.</p></div>
1841 <div class="paragraph"><p>The following description divides
1842 the low-level commands into commands that manipulate objects (in
1843 the repository, index, and working tree), commands that interrogate and
1844 compare objects, and commands that move objects and references between
1845 repositories.</p></div>
1846 <div class="sect2">
1847 <h3 id="_manipulation_commands">Manipulation commands</h3>
1848 <div class="dlist"><dl>
1849 <dt class="hdlist1">
1850 <a href="git-apply.html">git-apply(1)</a>
1851 </dt>
1852 <dd>
1854 Apply a patch to files and/or to the index.
1855 </p>
1856 </dd>
1857 <dt class="hdlist1">
1858 <a href="git-checkout-index.html">git-checkout-index(1)</a>
1859 </dt>
1860 <dd>
1862 Copy files from the index to the working tree.
1863 </p>
1864 </dd>
1865 <dt class="hdlist1">
1866 <a href="git-commit-graph.html">git-commit-graph(1)</a>
1867 </dt>
1868 <dd>
1870 Write and verify Git commit-graph files.
1871 </p>
1872 </dd>
1873 <dt class="hdlist1">
1874 <a href="git-commit-tree.html">git-commit-tree(1)</a>
1875 </dt>
1876 <dd>
1878 Create a new commit object.
1879 </p>
1880 </dd>
1881 <dt class="hdlist1">
1882 <a href="git-hash-object.html">git-hash-object(1)</a>
1883 </dt>
1884 <dd>
1886 Compute object ID and optionally create an object from a file.
1887 </p>
1888 </dd>
1889 <dt class="hdlist1">
1890 <a href="git-index-pack.html">git-index-pack(1)</a>
1891 </dt>
1892 <dd>
1894 Build pack index file for an existing packed archive.
1895 </p>
1896 </dd>
1897 <dt class="hdlist1">
1898 <a href="git-merge-file.html">git-merge-file(1)</a>
1899 </dt>
1900 <dd>
1902 Run a three-way file merge.
1903 </p>
1904 </dd>
1905 <dt class="hdlist1">
1906 <a href="git-merge-index.html">git-merge-index(1)</a>
1907 </dt>
1908 <dd>
1910 Run a merge for files needing merging.
1911 </p>
1912 </dd>
1913 <dt class="hdlist1">
1914 <a href="git-mktag.html">git-mktag(1)</a>
1915 </dt>
1916 <dd>
1918 Creates a tag object with extra validation.
1919 </p>
1920 </dd>
1921 <dt class="hdlist1">
1922 <a href="git-mktree.html">git-mktree(1)</a>
1923 </dt>
1924 <dd>
1926 Build a tree-object from ls-tree formatted text.
1927 </p>
1928 </dd>
1929 <dt class="hdlist1">
1930 <a href="git-multi-pack-index.html">git-multi-pack-index(1)</a>
1931 </dt>
1932 <dd>
1934 Write and verify multi-pack-indexes.
1935 </p>
1936 </dd>
1937 <dt class="hdlist1">
1938 <a href="git-pack-objects.html">git-pack-objects(1)</a>
1939 </dt>
1940 <dd>
1942 Create a packed archive of objects.
1943 </p>
1944 </dd>
1945 <dt class="hdlist1">
1946 <a href="git-prune-packed.html">git-prune-packed(1)</a>
1947 </dt>
1948 <dd>
1950 Remove extra objects that are already in pack files.
1951 </p>
1952 </dd>
1953 <dt class="hdlist1">
1954 <a href="git-read-tree.html">git-read-tree(1)</a>
1955 </dt>
1956 <dd>
1958 Reads tree information into the index.
1959 </p>
1960 </dd>
1961 <dt class="hdlist1">
1962 <a href="git-replay.html">git-replay(1)</a>
1963 </dt>
1964 <dd>
1966 EXPERIMENTAL: Replay commits on a new base, works with bare repos too.
1967 </p>
1968 </dd>
1969 <dt class="hdlist1">
1970 <a href="git-symbolic-ref.html">git-symbolic-ref(1)</a>
1971 </dt>
1972 <dd>
1974 Read, modify and delete symbolic refs.
1975 </p>
1976 </dd>
1977 <dt class="hdlist1">
1978 <a href="git-unpack-objects.html">git-unpack-objects(1)</a>
1979 </dt>
1980 <dd>
1982 Unpack objects from a packed archive.
1983 </p>
1984 </dd>
1985 <dt class="hdlist1">
1986 <a href="git-update-index.html">git-update-index(1)</a>
1987 </dt>
1988 <dd>
1990 Register file contents in the working tree to the index.
1991 </p>
1992 </dd>
1993 <dt class="hdlist1">
1994 <a href="git-update-ref.html">git-update-ref(1)</a>
1995 </dt>
1996 <dd>
1998 Update the object name stored in a ref safely.
1999 </p>
2000 </dd>
2001 <dt class="hdlist1">
2002 <a href="git-write-tree.html">git-write-tree(1)</a>
2003 </dt>
2004 <dd>
2006 Create a tree object from the current index.
2007 </p>
2008 </dd>
2009 </dl></div>
2010 </div>
2011 <div class="sect2">
2012 <h3 id="_interrogation_commands">Interrogation commands</h3>
2013 <div class="dlist"><dl>
2014 <dt class="hdlist1">
2015 <a href="git-cat-file.html">git-cat-file(1)</a>
2016 </dt>
2017 <dd>
2019 Provide contents or details of repository objects.
2020 </p>
2021 </dd>
2022 <dt class="hdlist1">
2023 <a href="git-cherry.html">git-cherry(1)</a>
2024 </dt>
2025 <dd>
2027 Find commits yet to be applied to upstream.
2028 </p>
2029 </dd>
2030 <dt class="hdlist1">
2031 <a href="git-diff-files.html">git-diff-files(1)</a>
2032 </dt>
2033 <dd>
2035 Compares files in the working tree and the index.
2036 </p>
2037 </dd>
2038 <dt class="hdlist1">
2039 <a href="git-diff-index.html">git-diff-index(1)</a>
2040 </dt>
2041 <dd>
2043 Compare a tree to the working tree or index.
2044 </p>
2045 </dd>
2046 <dt class="hdlist1">
2047 <a href="git-diff-tree.html">git-diff-tree(1)</a>
2048 </dt>
2049 <dd>
2051 Compares the content and mode of blobs found via two tree objects.
2052 </p>
2053 </dd>
2054 <dt class="hdlist1">
2055 <a href="git-for-each-ref.html">git-for-each-ref(1)</a>
2056 </dt>
2057 <dd>
2059 Output information on each ref.
2060 </p>
2061 </dd>
2062 <dt class="hdlist1">
2063 <a href="git-for-each-repo.html">git-for-each-repo(1)</a>
2064 </dt>
2065 <dd>
2067 Run a Git command on a list of repositories.
2068 </p>
2069 </dd>
2070 <dt class="hdlist1">
2071 <a href="git-get-tar-commit-id.html">git-get-tar-commit-id(1)</a>
2072 </dt>
2073 <dd>
2075 Extract commit ID from an archive created using git-archive.
2076 </p>
2077 </dd>
2078 <dt class="hdlist1">
2079 <a href="git-ls-files.html">git-ls-files(1)</a>
2080 </dt>
2081 <dd>
2083 Show information about files in the index and the working tree.
2084 </p>
2085 </dd>
2086 <dt class="hdlist1">
2087 <a href="git-ls-remote.html">git-ls-remote(1)</a>
2088 </dt>
2089 <dd>
2091 List references in a remote repository.
2092 </p>
2093 </dd>
2094 <dt class="hdlist1">
2095 <a href="git-ls-tree.html">git-ls-tree(1)</a>
2096 </dt>
2097 <dd>
2099 List the contents of a tree object.
2100 </p>
2101 </dd>
2102 <dt class="hdlist1">
2103 <a href="git-merge-base.html">git-merge-base(1)</a>
2104 </dt>
2105 <dd>
2107 Find as good common ancestors as possible for a merge.
2108 </p>
2109 </dd>
2110 <dt class="hdlist1">
2111 <a href="git-name-rev.html">git-name-rev(1)</a>
2112 </dt>
2113 <dd>
2115 Find symbolic names for given revs.
2116 </p>
2117 </dd>
2118 <dt class="hdlist1">
2119 <a href="git-pack-redundant.html">git-pack-redundant(1)</a>
2120 </dt>
2121 <dd>
2123 Find redundant pack files.
2124 </p>
2125 </dd>
2126 <dt class="hdlist1">
2127 <a href="git-rev-list.html">git-rev-list(1)</a>
2128 </dt>
2129 <dd>
2131 Lists commit objects in reverse chronological order.
2132 </p>
2133 </dd>
2134 <dt class="hdlist1">
2135 <a href="git-rev-parse.html">git-rev-parse(1)</a>
2136 </dt>
2137 <dd>
2139 Pick out and massage parameters.
2140 </p>
2141 </dd>
2142 <dt class="hdlist1">
2143 <a href="git-show-index.html">git-show-index(1)</a>
2144 </dt>
2145 <dd>
2147 Show packed archive index.
2148 </p>
2149 </dd>
2150 <dt class="hdlist1">
2151 <a href="git-show-ref.html">git-show-ref(1)</a>
2152 </dt>
2153 <dd>
2155 List references in a local repository.
2156 </p>
2157 </dd>
2158 <dt class="hdlist1">
2159 <a href="git-unpack-file.html">git-unpack-file(1)</a>
2160 </dt>
2161 <dd>
2163 Creates a temporary file with a blob&#8217;s contents.
2164 </p>
2165 </dd>
2166 <dt class="hdlist1">
2167 <a href="git-var.html">git-var(1)</a>
2168 </dt>
2169 <dd>
2171 Show a Git logical variable.
2172 </p>
2173 </dd>
2174 <dt class="hdlist1">
2175 <a href="git-verify-pack.html">git-verify-pack(1)</a>
2176 </dt>
2177 <dd>
2179 Validate packed Git archive files.
2180 </p>
2181 </dd>
2182 </dl></div>
2183 <div class="paragraph"><p>In general, the interrogate commands do not touch the files in
2184 the working tree.</p></div>
2185 </div>
2186 <div class="sect2">
2187 <h3 id="_syncing_repositories">Syncing repositories</h3>
2188 <div class="dlist"><dl>
2189 <dt class="hdlist1">
2190 <a href="git-daemon.html">git-daemon(1)</a>
2191 </dt>
2192 <dd>
2194 A really simple server for Git repositories.
2195 </p>
2196 </dd>
2197 <dt class="hdlist1">
2198 <a href="git-fetch-pack.html">git-fetch-pack(1)</a>
2199 </dt>
2200 <dd>
2202 Receive missing objects from another repository.
2203 </p>
2204 </dd>
2205 <dt class="hdlist1">
2206 <a href="git-http-backend.html">git-http-backend(1)</a>
2207 </dt>
2208 <dd>
2210 Server side implementation of Git over HTTP.
2211 </p>
2212 </dd>
2213 <dt class="hdlist1">
2214 <a href="git-send-pack.html">git-send-pack(1)</a>
2215 </dt>
2216 <dd>
2218 Push objects over Git protocol to another repository.
2219 </p>
2220 </dd>
2221 <dt class="hdlist1">
2222 <a href="git-update-server-info.html">git-update-server-info(1)</a>
2223 </dt>
2224 <dd>
2226 Update auxiliary info file to help dumb servers.
2227 </p>
2228 </dd>
2229 </dl></div>
2230 <div class="paragraph"><p>The following are helper commands used by the above; end users
2231 typically do not use them directly.</p></div>
2232 <div class="dlist"><dl>
2233 <dt class="hdlist1">
2234 <a href="git-http-fetch.html">git-http-fetch(1)</a>
2235 </dt>
2236 <dd>
2238 Download from a remote Git repository via HTTP.
2239 </p>
2240 </dd>
2241 <dt class="hdlist1">
2242 <a href="git-http-push.html">git-http-push(1)</a>
2243 </dt>
2244 <dd>
2246 Push objects over HTTP/DAV to another repository.
2247 </p>
2248 </dd>
2249 <dt class="hdlist1">
2250 <a href="git-receive-pack.html">git-receive-pack(1)</a>
2251 </dt>
2252 <dd>
2254 Receive what is pushed into the repository.
2255 </p>
2256 </dd>
2257 <dt class="hdlist1">
2258 <a href="git-shell.html">git-shell(1)</a>
2259 </dt>
2260 <dd>
2262 Restricted login shell for Git-only SSH access.
2263 </p>
2264 </dd>
2265 <dt class="hdlist1">
2266 <a href="git-upload-archive.html">git-upload-archive(1)</a>
2267 </dt>
2268 <dd>
2270 Send archive back to git-archive.
2271 </p>
2272 </dd>
2273 <dt class="hdlist1">
2274 <a href="git-upload-pack.html">git-upload-pack(1)</a>
2275 </dt>
2276 <dd>
2278 Send objects packed back to git-fetch-pack.
2279 </p>
2280 </dd>
2281 </dl></div>
2282 </div>
2283 <div class="sect2">
2284 <h3 id="_internal_helper_commands">Internal helper commands</h3>
2285 <div class="paragraph"><p>These are internal helper commands used by other commands; end
2286 users typically do not use them directly.</p></div>
2287 <div class="dlist"><dl>
2288 <dt class="hdlist1">
2289 <a href="git-check-attr.html">git-check-attr(1)</a>
2290 </dt>
2291 <dd>
2293 Display gitattributes information.
2294 </p>
2295 </dd>
2296 <dt class="hdlist1">
2297 <a href="git-check-ignore.html">git-check-ignore(1)</a>
2298 </dt>
2299 <dd>
2301 Debug gitignore / exclude files.
2302 </p>
2303 </dd>
2304 <dt class="hdlist1">
2305 <a href="git-check-mailmap.html">git-check-mailmap(1)</a>
2306 </dt>
2307 <dd>
2309 Show canonical names and email addresses of contacts.
2310 </p>
2311 </dd>
2312 <dt class="hdlist1">
2313 <a href="git-check-ref-format.html">git-check-ref-format(1)</a>
2314 </dt>
2315 <dd>
2317 Ensures that a reference name is well formed.
2318 </p>
2319 </dd>
2320 <dt class="hdlist1">
2321 <a href="git-column.html">git-column(1)</a>
2322 </dt>
2323 <dd>
2325 Display data in columns.
2326 </p>
2327 </dd>
2328 <dt class="hdlist1">
2329 <a href="git-credential.html">git-credential(1)</a>
2330 </dt>
2331 <dd>
2333 Retrieve and store user credentials.
2334 </p>
2335 </dd>
2336 <dt class="hdlist1">
2337 <a href="git-credential-cache.html">git-credential-cache(1)</a>
2338 </dt>
2339 <dd>
2341 Helper to temporarily store passwords in memory.
2342 </p>
2343 </dd>
2344 <dt class="hdlist1">
2345 <a href="git-credential-store.html">git-credential-store(1)</a>
2346 </dt>
2347 <dd>
2349 Helper to store credentials on disk.
2350 </p>
2351 </dd>
2352 <dt class="hdlist1">
2353 <a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>
2354 </dt>
2355 <dd>
2357 Produce a merge commit message.
2358 </p>
2359 </dd>
2360 <dt class="hdlist1">
2361 <a href="git-hook.html">git-hook(1)</a>
2362 </dt>
2363 <dd>
2365 Run git hooks.
2366 </p>
2367 </dd>
2368 <dt class="hdlist1">
2369 <a href="git-interpret-trailers.html">git-interpret-trailers(1)</a>
2370 </dt>
2371 <dd>
2373 Add or parse structured information in commit messages.
2374 </p>
2375 </dd>
2376 <dt class="hdlist1">
2377 <a href="git-mailinfo.html">git-mailinfo(1)</a>
2378 </dt>
2379 <dd>
2381 Extracts patch and authorship from a single e-mail message.
2382 </p>
2383 </dd>
2384 <dt class="hdlist1">
2385 <a href="git-mailsplit.html">git-mailsplit(1)</a>
2386 </dt>
2387 <dd>
2389 Simple UNIX mbox splitter program.
2390 </p>
2391 </dd>
2392 <dt class="hdlist1">
2393 <a href="git-merge-one-file.html">git-merge-one-file(1)</a>
2394 </dt>
2395 <dd>
2397 The standard helper program to use with git-merge-index.
2398 </p>
2399 </dd>
2400 <dt class="hdlist1">
2401 <a href="git-patch-id.html">git-patch-id(1)</a>
2402 </dt>
2403 <dd>
2405 Compute unique ID for a patch.
2406 </p>
2407 </dd>
2408 <dt class="hdlist1">
2409 <a href="git-sh-i18n.html">git-sh-i18n(1)</a>
2410 </dt>
2411 <dd>
2413 Git&#8217;s i18n setup code for shell scripts.
2414 </p>
2415 </dd>
2416 <dt class="hdlist1">
2417 <a href="git-sh-setup.html">git-sh-setup(1)</a>
2418 </dt>
2419 <dd>
2421 Common Git shell script setup code.
2422 </p>
2423 </dd>
2424 <dt class="hdlist1">
2425 <a href="git-stripspace.html">git-stripspace(1)</a>
2426 </dt>
2427 <dd>
2429 Remove unnecessary whitespace.
2430 </p>
2431 </dd>
2432 </dl></div>
2433 </div>
2434 </div>
2435 </div>
2436 <div class="sect1">
2437 <h2 id="_guides">Guides</h2>
2438 <div class="sectionbody">
2439 <div class="paragraph"><p>The following documentation pages are guides about Git concepts.</p></div>
2440 <div class="dlist"><dl>
2441 <dt class="hdlist1">
2442 <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>
2443 </dt>
2444 <dd>
2446 A Git core tutorial for developers.
2447 </p>
2448 </dd>
2449 <dt class="hdlist1">
2450 <a href="gitcredentials.html">gitcredentials(7)</a>
2451 </dt>
2452 <dd>
2454 Providing usernames and passwords to Git.
2455 </p>
2456 </dd>
2457 <dt class="hdlist1">
2458 <a href="gitcvs-migration.html">gitcvs-migration(7)</a>
2459 </dt>
2460 <dd>
2462 Git for CVS users.
2463 </p>
2464 </dd>
2465 <dt class="hdlist1">
2466 <a href="gitdiffcore.html">gitdiffcore(7)</a>
2467 </dt>
2468 <dd>
2470 Tweaking diff output.
2471 </p>
2472 </dd>
2473 <dt class="hdlist1">
2474 <a href="giteveryday.html">giteveryday(7)</a>
2475 </dt>
2476 <dd>
2478 A useful minimum set of commands for Everyday Git.
2479 </p>
2480 </dd>
2481 <dt class="hdlist1">
2482 <a href="gitfaq.html">gitfaq(7)</a>
2483 </dt>
2484 <dd>
2486 Frequently asked questions about using Git.
2487 </p>
2488 </dd>
2489 <dt class="hdlist1">
2490 <a href="gitglossary.html">gitglossary(7)</a>
2491 </dt>
2492 <dd>
2494 A Git Glossary.
2495 </p>
2496 </dd>
2497 <dt class="hdlist1">
2498 <a href="gitnamespaces.html">gitnamespaces(7)</a>
2499 </dt>
2500 <dd>
2502 Git namespaces.
2503 </p>
2504 </dd>
2505 <dt class="hdlist1">
2506 <a href="gitremote-helpers.html">gitremote-helpers(7)</a>
2507 </dt>
2508 <dd>
2510 Helper programs to interact with remote repositories.
2511 </p>
2512 </dd>
2513 <dt class="hdlist1">
2514 <a href="gitsubmodules.html">gitsubmodules(7)</a>
2515 </dt>
2516 <dd>
2518 Mounting one repository inside another.
2519 </p>
2520 </dd>
2521 <dt class="hdlist1">
2522 <a href="gittutorial.html">gittutorial(7)</a>
2523 </dt>
2524 <dd>
2526 A tutorial introduction to Git.
2527 </p>
2528 </dd>
2529 <dt class="hdlist1">
2530 <a href="gittutorial-2.html">gittutorial-2(7)</a>
2531 </dt>
2532 <dd>
2534 A tutorial introduction to Git: part two.
2535 </p>
2536 </dd>
2537 <dt class="hdlist1">
2538 <a href="gitworkflows.html">gitworkflows(7)</a>
2539 </dt>
2540 <dd>
2542 An overview of recommended workflows with Git.
2543 </p>
2544 </dd>
2545 </dl></div>
2546 </div>
2547 </div>
2548 <div class="sect1">
2549 <h2 id="_repository_command_and_file_interfaces">Repository, command and file interfaces</h2>
2550 <div class="sectionbody">
2551 <div class="paragraph"><p>This documentation discusses repository and command interfaces which
2552 users are expected to interact with directly. See <code>--user-formats</code> in
2553 <a href="git-help.html">git-help(1)</a> for more details on the criteria.</p></div>
2554 <div class="dlist"><dl>
2555 <dt class="hdlist1">
2556 <a href="gitattributes.html">gitattributes(5)</a>
2557 </dt>
2558 <dd>
2560 Defining attributes per path.
2561 </p>
2562 </dd>
2563 <dt class="hdlist1">
2564 <a href="gitcli.html">gitcli(7)</a>
2565 </dt>
2566 <dd>
2568 Git command-line interface and conventions.
2569 </p>
2570 </dd>
2571 <dt class="hdlist1">
2572 <a href="githooks.html">githooks(5)</a>
2573 </dt>
2574 <dd>
2576 Hooks used by Git.
2577 </p>
2578 </dd>
2579 <dt class="hdlist1">
2580 <a href="gitignore.html">gitignore(5)</a>
2581 </dt>
2582 <dd>
2584 Specifies intentionally untracked files to ignore.
2585 </p>
2586 </dd>
2587 <dt class="hdlist1">
2588 <a href="gitmailmap.html">gitmailmap(5)</a>
2589 </dt>
2590 <dd>
2592 Map author/committer names and/or E-Mail addresses.
2593 </p>
2594 </dd>
2595 <dt class="hdlist1">
2596 <a href="gitmodules.html">gitmodules(5)</a>
2597 </dt>
2598 <dd>
2600 Defining submodule properties.
2601 </p>
2602 </dd>
2603 <dt class="hdlist1">
2604 <a href="gitrepository-layout.html">gitrepository-layout(5)</a>
2605 </dt>
2606 <dd>
2608 Git Repository Layout.
2609 </p>
2610 </dd>
2611 <dt class="hdlist1">
2612 <a href="gitrevisions.html">gitrevisions(7)</a>
2613 </dt>
2614 <dd>
2616 Specifying revisions and ranges for Git.
2617 </p>
2618 </dd>
2619 </dl></div>
2620 </div>
2621 </div>
2622 <div class="sect1">
2623 <h2 id="_file_formats_protocols_and_other_developer_interfaces">File formats, protocols and other developer interfaces</h2>
2624 <div class="sectionbody">
2625 <div class="paragraph"><p>This documentation discusses file formats, over-the-wire protocols and
2626 other git developer interfaces. See <code>--developer-interfaces</code> in
2627 <a href="git-help.html">git-help(1)</a>.</p></div>
2628 <div class="dlist"><dl>
2629 <dt class="hdlist1">
2630 <a href="gitformat-bundle.html">gitformat-bundle(5)</a>
2631 </dt>
2632 <dd>
2634 The bundle file format.
2635 </p>
2636 </dd>
2637 <dt class="hdlist1">
2638 <a href="gitformat-chunk.html">gitformat-chunk(5)</a>
2639 </dt>
2640 <dd>
2642 Chunk-based file formats.
2643 </p>
2644 </dd>
2645 <dt class="hdlist1">
2646 <a href="gitformat-commit-graph.html">gitformat-commit-graph(5)</a>
2647 </dt>
2648 <dd>
2650 Git commit-graph format.
2651 </p>
2652 </dd>
2653 <dt class="hdlist1">
2654 <a href="gitformat-index.html">gitformat-index(5)</a>
2655 </dt>
2656 <dd>
2658 Git index format.
2659 </p>
2660 </dd>
2661 <dt class="hdlist1">
2662 <a href="gitformat-pack.html">gitformat-pack(5)</a>
2663 </dt>
2664 <dd>
2666 Git pack format.
2667 </p>
2668 </dd>
2669 <dt class="hdlist1">
2670 <a href="gitformat-signature.html">gitformat-signature(5)</a>
2671 </dt>
2672 <dd>
2674 Git cryptographic signature formats.
2675 </p>
2676 </dd>
2677 <dt class="hdlist1">
2678 <a href="gitprotocol-capabilities.html">gitprotocol-capabilities(5)</a>
2679 </dt>
2680 <dd>
2682 Protocol v0 and v1 capabilities.
2683 </p>
2684 </dd>
2685 <dt class="hdlist1">
2686 <a href="gitprotocol-common.html">gitprotocol-common(5)</a>
2687 </dt>
2688 <dd>
2690 Things common to various protocols.
2691 </p>
2692 </dd>
2693 <dt class="hdlist1">
2694 <a href="gitprotocol-http.html">gitprotocol-http(5)</a>
2695 </dt>
2696 <dd>
2698 Git HTTP-based protocols.
2699 </p>
2700 </dd>
2701 <dt class="hdlist1">
2702 <a href="gitprotocol-pack.html">gitprotocol-pack(5)</a>
2703 </dt>
2704 <dd>
2706 How packs are transferred over-the-wire.
2707 </p>
2708 </dd>
2709 <dt class="hdlist1">
2710 <a href="gitprotocol-v2.html">gitprotocol-v2(5)</a>
2711 </dt>
2712 <dd>
2714 Git Wire Protocol, Version 2.
2715 </p>
2716 </dd>
2717 </dl></div>
2718 </div>
2719 </div>
2720 <div class="sect1">
2721 <h2 id="_configuration_mechanism">Configuration Mechanism</h2>
2722 <div class="sectionbody">
2723 <div class="paragraph"><p>Git uses a simple text format to store customizations that are per
2724 repository and are per user. Such a configuration file may look
2725 like this:</p></div>
2726 <div class="listingblock">
2727 <div class="content">
2728 <pre><code>#
2729 # A '#' or ';' character indicates a comment.
2732 ; core variables
2733 [core]
2734 ; Don't trust file modes
2735 filemode = false
2737 ; user identity
2738 [user]
2739 name = "Junio C Hamano"
2740 email = "gitster@pobox.com"</code></pre>
2741 </div></div>
2742 <div class="paragraph"><p>Various commands read from the configuration file and adjust
2743 their operation accordingly. See <a href="git-config.html">git-config(1)</a> for a
2744 list and more details about the configuration mechanism.</p></div>
2745 </div>
2746 </div>
2747 <div class="sect1">
2748 <h2 id="_identifier_terminology">Identifier Terminology</h2>
2749 <div class="sectionbody">
2750 <div class="dlist"><dl>
2751 <dt class="hdlist1">
2752 &lt;object&gt;
2753 </dt>
2754 <dd>
2756 Indicates the object name for any type of object.
2757 </p>
2758 </dd>
2759 <dt class="hdlist1">
2760 &lt;blob&gt;
2761 </dt>
2762 <dd>
2764 Indicates a blob object name.
2765 </p>
2766 </dd>
2767 <dt class="hdlist1">
2768 &lt;tree&gt;
2769 </dt>
2770 <dd>
2772 Indicates a tree object name.
2773 </p>
2774 </dd>
2775 <dt class="hdlist1">
2776 &lt;commit&gt;
2777 </dt>
2778 <dd>
2780 Indicates a commit object name.
2781 </p>
2782 </dd>
2783 <dt class="hdlist1">
2784 &lt;tree-ish&gt;
2785 </dt>
2786 <dd>
2788 Indicates a tree, commit or tag object name. A
2789 command that takes a &lt;tree-ish&gt; argument ultimately wants to
2790 operate on a &lt;tree&gt; object but automatically dereferences
2791 &lt;commit&gt; and &lt;tag&gt; objects that point at a &lt;tree&gt;.
2792 </p>
2793 </dd>
2794 <dt class="hdlist1">
2795 &lt;commit-ish&gt;
2796 </dt>
2797 <dd>
2799 Indicates a commit or tag object name. A
2800 command that takes a &lt;commit-ish&gt; argument ultimately wants to
2801 operate on a &lt;commit&gt; object but automatically dereferences
2802 &lt;tag&gt; objects that point at a &lt;commit&gt;.
2803 </p>
2804 </dd>
2805 <dt class="hdlist1">
2806 &lt;type&gt;
2807 </dt>
2808 <dd>
2810 Indicates that an object type is required.
2811 Currently one of: <code>blob</code>, <code>tree</code>, <code>commit</code>, or <code>tag</code>.
2812 </p>
2813 </dd>
2814 <dt class="hdlist1">
2815 &lt;file&gt;
2816 </dt>
2817 <dd>
2819 Indicates a filename - almost always relative to the
2820 root of the tree structure <code>GIT_INDEX_FILE</code> describes.
2821 </p>
2822 </dd>
2823 </dl></div>
2824 </div>
2825 </div>
2826 <div class="sect1">
2827 <h2 id="_symbolic_identifiers">Symbolic Identifiers</h2>
2828 <div class="sectionbody">
2829 <div class="paragraph"><p>Any Git command accepting any &lt;object&gt; can also use the following
2830 symbolic notation:</p></div>
2831 <div class="dlist"><dl>
2832 <dt class="hdlist1">
2833 HEAD
2834 </dt>
2835 <dd>
2837 indicates the head of the current branch.
2838 </p>
2839 </dd>
2840 <dt class="hdlist1">
2841 &lt;tag&gt;
2842 </dt>
2843 <dd>
2845 a valid tag <em>name</em>
2846 (i.e. a <code>refs/tags/&lt;tag&gt;</code> reference).
2847 </p>
2848 </dd>
2849 <dt class="hdlist1">
2850 &lt;head&gt;
2851 </dt>
2852 <dd>
2854 a valid head <em>name</em>
2855 (i.e. a <code>refs/heads/&lt;head&gt;</code> reference).
2856 </p>
2857 </dd>
2858 </dl></div>
2859 <div class="paragraph"><p>For a more complete list of ways to spell object names, see
2860 "SPECIFYING REVISIONS" section in <a href="gitrevisions.html">gitrevisions(7)</a>.</p></div>
2861 </div>
2862 </div>
2863 <div class="sect1">
2864 <h2 id="_file_directory_structure">File/Directory Structure</h2>
2865 <div class="sectionbody">
2866 <div class="paragraph"><p>Please see the <a href="gitrepository-layout.html">gitrepository-layout(5)</a> document.</p></div>
2867 <div class="paragraph"><p>Read <a href="githooks.html">githooks(5)</a> for more details about each hook.</p></div>
2868 <div class="paragraph"><p>Higher level SCMs may provide and manage additional information in the
2869 <code>$GIT_DIR</code>.</p></div>
2870 </div>
2871 </div>
2872 <div class="sect1">
2873 <h2 id="_terminology">Terminology</h2>
2874 <div class="sectionbody">
2875 <div class="paragraph"><p>Please see <a href="gitglossary.html">gitglossary(7)</a>.</p></div>
2876 </div>
2877 </div>
2878 <div class="sect1">
2879 <h2 id="_environment_variables">Environment Variables</h2>
2880 <div class="sectionbody">
2881 <div class="paragraph"><p>Various Git commands pay attention to environment variables and change
2882 their behavior. The environment variables marked as "Boolean" take
2883 their values the same way as Boolean valued configuration variables, e.g.
2884 "true", "yes", "on" and positive numbers are taken as "yes".</p></div>
2885 <div class="paragraph"><p>Here are the variables:</p></div>
2886 <div class="sect2">
2887 <h3 id="_the_git_repository">The Git Repository</h3>
2888 <div class="paragraph"><p>These environment variables apply to <em>all</em> core Git commands. Nb: it
2889 is worth noting that they may be used/overridden by SCMS sitting above
2890 Git so take care if using a foreign front-end.</p></div>
2891 <div class="dlist"><dl>
2892 <dt class="hdlist1">
2893 <code>GIT_INDEX_FILE</code>
2894 </dt>
2895 <dd>
2897 This environment variable specifies an alternate
2898 index file. If not specified, the default of <code>$GIT_DIR/index</code>
2899 is used.
2900 </p>
2901 </dd>
2902 <dt class="hdlist1">
2903 <code>GIT_INDEX_VERSION</code>
2904 </dt>
2905 <dd>
2907 This environment variable specifies what index version is used
2908 when writing the index file out. It won&#8217;t affect existing index
2909 files. By default index file version 2 or 3 is used. See
2910 <a href="git-update-index.html">git-update-index(1)</a> for more information.
2911 </p>
2912 </dd>
2913 <dt class="hdlist1">
2914 <code>GIT_OBJECT_DIRECTORY</code>
2915 </dt>
2916 <dd>
2918 If the object storage directory is specified via this
2919 environment variable then the sha1 directories are created
2920 underneath - otherwise the default <code>$GIT_DIR/objects</code>
2921 directory is used.
2922 </p>
2923 </dd>
2924 <dt class="hdlist1">
2925 <code>GIT_ALTERNATE_OBJECT_DIRECTORIES</code>
2926 </dt>
2927 <dd>
2929 Due to the immutable nature of Git objects, old objects can be
2930 archived into shared, read-only directories. This variable
2931 specifies a ":" separated (on Windows ";" separated) list
2932 of Git object directories which can be used to search for Git
2933 objects. New objects will not be written to these directories.
2934 </p>
2935 <div class="paragraph"><p>Entries that begin with <code>"</code> (double-quote) will be interpreted
2936 as C-style quoted paths, removing leading and trailing
2937 double-quotes and respecting backslash escapes. E.g., the value
2938 <code>"path-with-\"-and-:-in-it":vanilla-path</code> has two paths:
2939 <code>path-with-"-and-:-in-it</code> and <code>vanilla-path</code>.</p></div>
2940 </dd>
2941 <dt class="hdlist1">
2942 <code>GIT_DIR</code>
2943 </dt>
2944 <dd>
2946 If the <code>GIT_DIR</code> environment variable is set then it
2947 specifies a path to use instead of the default <code>.git</code>
2948 for the base of the repository.
2949 The <code>--git-dir</code> command-line option also sets this value.
2950 </p>
2951 </dd>
2952 <dt class="hdlist1">
2953 <code>GIT_WORK_TREE</code>
2954 </dt>
2955 <dd>
2957 Set the path to the root of the working tree.
2958 This can also be controlled by the <code>--work-tree</code> command-line
2959 option and the core.worktree configuration variable.
2960 </p>
2961 </dd>
2962 <dt class="hdlist1">
2963 <code>GIT_NAMESPACE</code>
2964 </dt>
2965 <dd>
2967 Set the Git namespace; see <a href="gitnamespaces.html">gitnamespaces(7)</a> for details.
2968 The <code>--namespace</code> command-line option also sets this value.
2969 </p>
2970 </dd>
2971 <dt class="hdlist1">
2972 <code>GIT_CEILING_DIRECTORIES</code>
2973 </dt>
2974 <dd>
2976 This should be a colon-separated list of absolute paths. If
2977 set, it is a list of directories that Git should not chdir up
2978 into while looking for a repository directory (useful for
2979 excluding slow-loading network directories). It will not
2980 exclude the current working directory or a GIT_DIR set on the
2981 command line or in the environment. Normally, Git has to read
2982 the entries in this list and resolve any symlink that
2983 might be present in order to compare them with the current
2984 directory. However, if even this access is slow, you
2985 can add an empty entry to the list to tell Git that the
2986 subsequent entries are not symlinks and needn&#8217;t be resolved;
2987 e.g.,
2988 <code>GIT_CEILING_DIRECTORIES=/maybe/symlink::/very/slow/non/symlink</code>.
2989 </p>
2990 </dd>
2991 <dt class="hdlist1">
2992 <code>GIT_DISCOVERY_ACROSS_FILESYSTEM</code>
2993 </dt>
2994 <dd>
2996 When run in a directory that does not have ".git" repository
2997 directory, Git tries to find such a directory in the parent
2998 directories to find the top of the working tree, but by default it
2999 does not cross filesystem boundaries. This Boolean environment variable
3000 can be set to true to tell Git not to stop at filesystem
3001 boundaries. Like <code>GIT_CEILING_DIRECTORIES</code>, this will not affect
3002 an explicit repository directory set via <code>GIT_DIR</code> or on the
3003 command line.
3004 </p>
3005 </dd>
3006 <dt class="hdlist1">
3007 <code>GIT_COMMON_DIR</code>
3008 </dt>
3009 <dd>
3011 If this variable is set to a path, non-worktree files that are
3012 normally in $GIT_DIR will be taken from this path
3013 instead. Worktree-specific files such as HEAD or index are
3014 taken from $GIT_DIR. See <a href="gitrepository-layout.html">gitrepository-layout(5)</a> and
3015 <a href="git-worktree.html">git-worktree(1)</a> for
3016 details. This variable has lower precedence than other path
3017 variables such as GIT_INDEX_FILE, GIT_OBJECT_DIRECTORY&#8230;
3018 </p>
3019 </dd>
3020 <dt class="hdlist1">
3021 <code>GIT_DEFAULT_HASH</code>
3022 </dt>
3023 <dd>
3025 If this variable is set, the default hash algorithm for new
3026 repositories will be set to this value. This value is
3027 ignored when cloning and the setting of the remote repository
3028 is always used. The default is "sha1".
3029 See <code>--object-format</code> in <a href="git-init.html">git-init(1)</a>.
3030 </p>
3031 </dd>
3032 <dt class="hdlist1">
3033 <code>GIT_DEFAULT_REF_FORMAT</code>
3034 </dt>
3035 <dd>
3037 If this variable is set, the default reference backend format for new
3038 repositories will be set to this value. The default is "files".
3039 See <code>--ref-format</code> in <a href="git-init.html">git-init(1)</a>.
3040 </p>
3041 </dd>
3042 </dl></div>
3043 </div>
3044 <div class="sect2">
3045 <h3 id="_git_commits">Git Commits</h3>
3046 <div class="dlist"><dl>
3047 <dt class="hdlist1">
3048 <code>GIT_AUTHOR_NAME</code>
3049 </dt>
3050 <dd>
3052 The human-readable name used in the author identity when creating commit or
3053 tag objects, or when writing reflogs. Overrides the <code>user.name</code> and
3054 <code>author.name</code> configuration settings.
3055 </p>
3056 </dd>
3057 <dt class="hdlist1">
3058 <code>GIT_AUTHOR_EMAIL</code>
3059 </dt>
3060 <dd>
3062 The email address used in the author identity when creating commit or
3063 tag objects, or when writing reflogs. Overrides the <code>user.email</code> and
3064 <code>author.email</code> configuration settings.
3065 </p>
3066 </dd>
3067 <dt class="hdlist1">
3068 <code>GIT_AUTHOR_DATE</code>
3069 </dt>
3070 <dd>
3072 The date used for the author identity when creating commit or tag objects, or
3073 when writing reflogs. See <a href="git-commit.html">git-commit(1)</a> for valid formats.
3074 </p>
3075 </dd>
3076 <dt class="hdlist1">
3077 <code>GIT_COMMITTER_NAME</code>
3078 </dt>
3079 <dd>
3081 The human-readable name used in the committer identity when creating commit or
3082 tag objects, or when writing reflogs. Overrides the <code>user.name</code> and
3083 <code>committer.name</code> configuration settings.
3084 </p>
3085 </dd>
3086 <dt class="hdlist1">
3087 <code>GIT_COMMITTER_EMAIL</code>
3088 </dt>
3089 <dd>
3091 The email address used in the author identity when creating commit or
3092 tag objects, or when writing reflogs. Overrides the <code>user.email</code> and
3093 <code>committer.email</code> configuration settings.
3094 </p>
3095 </dd>
3096 <dt class="hdlist1">
3097 <code>GIT_COMMITTER_DATE</code>
3098 </dt>
3099 <dd>
3101 The date used for the committer identity when creating commit or tag objects, or
3102 when writing reflogs. See <a href="git-commit.html">git-commit(1)</a> for valid formats.
3103 </p>
3104 </dd>
3105 <dt class="hdlist1">
3106 <code>EMAIL</code>
3107 </dt>
3108 <dd>
3110 The email address used in the author and committer identities if no other
3111 relevant environment variable or configuration setting has been set.
3112 </p>
3113 </dd>
3114 </dl></div>
3115 </div>
3116 <div class="sect2">
3117 <h3 id="_git_diffs">Git Diffs</h3>
3118 <div class="dlist"><dl>
3119 <dt class="hdlist1">
3120 <code>GIT_DIFF_OPTS</code>
3121 </dt>
3122 <dd>
3124 Only valid setting is "--unified=??" or "-u??" to set the
3125 number of context lines shown when a unified diff is created.
3126 This takes precedence over any "-U" or "--unified" option
3127 value passed on the Git diff command line.
3128 </p>
3129 </dd>
3130 <dt class="hdlist1">
3131 <code>GIT_EXTERNAL_DIFF</code>
3132 </dt>
3133 <dd>
3135 When the environment variable <code>GIT_EXTERNAL_DIFF</code> is set, the
3136 program named by it is called to generate diffs, and Git
3137 does not use its builtin diff machinery.
3138 For a path that is added, removed, or modified,
3139 <code>GIT_EXTERNAL_DIFF</code> is called with 7 parameters:
3140 </p>
3141 <div class="literalblock">
3142 <div class="content">
3143 <pre><code>path old-file old-hex old-mode new-file new-hex new-mode</code></pre>
3144 </div></div>
3145 <div class="paragraph"><p>where:</p></div>
3146 </dd>
3147 <dt class="hdlist1">
3148 &lt;old|new&gt;-file
3149 </dt>
3150 <dd>
3152 are files GIT_EXTERNAL_DIFF can use to read the
3153 contents of &lt;old|new&gt;,
3154 </p>
3155 </dd>
3156 <dt class="hdlist1">
3157 &lt;old|new&gt;-hex
3158 </dt>
3159 <dd>
3161 are the 40-hexdigit SHA-1 hashes,
3162 </p>
3163 </dd>
3164 <dt class="hdlist1">
3165 &lt;old|new&gt;-mode
3166 </dt>
3167 <dd>
3169 are the octal representation of the file modes.
3170 </p>
3171 <div class="paragraph"><p>The file parameters can point at the user&#8217;s working file
3172 (e.g. <code>new-file</code> in "git-diff-files"), <code>/dev/null</code> (e.g. <code>old-file</code>
3173 when a new file is added), or a temporary file (e.g. <code>old-file</code> in the
3174 index). <code>GIT_EXTERNAL_DIFF</code> should not worry about unlinking the
3175 temporary file&#8201;&#8212;&#8201;it is removed when <code>GIT_EXTERNAL_DIFF</code> exits.</p></div>
3176 <div class="paragraph"><p>For a path that is unmerged, <code>GIT_EXTERNAL_DIFF</code> is called with 1
3177 parameter, &lt;path&gt;.</p></div>
3178 <div class="paragraph"><p>For each path <code>GIT_EXTERNAL_DIFF</code> is called, two environment variables,
3179 <code>GIT_DIFF_PATH_COUNTER</code> and <code>GIT_DIFF_PATH_TOTAL</code> are set.</p></div>
3180 </dd>
3181 <dt class="hdlist1">
3182 <code>GIT_DIFF_PATH_COUNTER</code>
3183 </dt>
3184 <dd>
3186 A 1-based counter incremented by one for every path.
3187 </p>
3188 </dd>
3189 <dt class="hdlist1">
3190 <code>GIT_DIFF_PATH_TOTAL</code>
3191 </dt>
3192 <dd>
3194 The total number of paths.
3195 </p>
3196 </dd>
3197 </dl></div>
3198 </div>
3199 <div class="sect2">
3200 <h3 id="_other">other</h3>
3201 <div class="dlist"><dl>
3202 <dt class="hdlist1">
3203 <code>GIT_MERGE_VERBOSITY</code>
3204 </dt>
3205 <dd>
3207 A number controlling the amount of output shown by
3208 the recursive merge strategy. Overrides merge.verbosity.
3209 See <a href="git-merge.html">git-merge(1)</a>
3210 </p>
3211 </dd>
3212 <dt class="hdlist1">
3213 <code>GIT_PAGER</code>
3214 </dt>
3215 <dd>
3217 This environment variable overrides <code>$PAGER</code>. If it is set
3218 to an empty string or to the value "cat", Git will not launch
3219 a pager. See also the <code>core.pager</code> option in
3220 <a href="git-config.html">git-config(1)</a>.
3221 </p>
3222 </dd>
3223 <dt class="hdlist1">
3224 <code>GIT_PROGRESS_DELAY</code>
3225 </dt>
3226 <dd>
3228 A number controlling how many seconds to delay before showing
3229 optional progress indicators. Defaults to 2.
3230 </p>
3231 </dd>
3232 <dt class="hdlist1">
3233 <code>GIT_EDITOR</code>
3234 </dt>
3235 <dd>
3237 This environment variable overrides <code>$EDITOR</code> and <code>$VISUAL</code>.
3238 It is used by several Git commands when, on interactive mode,
3239 an editor is to be launched. See also <a href="git-var.html">git-var(1)</a>
3240 and the <code>core.editor</code> option in <a href="git-config.html">git-config(1)</a>.
3241 </p>
3242 </dd>
3243 <dt class="hdlist1">
3244 <code>GIT_SEQUENCE_EDITOR</code>
3245 </dt>
3246 <dd>
3248 This environment variable overrides the configured Git editor
3249 when editing the todo list of an interactive rebase. See also
3250 <a href="git-rebase.html">git-rebase(1)</a> and the <code>sequence.editor</code> option in
3251 <a href="git-config.html">git-config(1)</a>.
3252 </p>
3253 </dd>
3254 <dt class="hdlist1">
3255 <code>GIT_SSH</code>
3256 </dt>
3257 <dt class="hdlist1">
3258 <code>GIT_SSH_COMMAND</code>
3259 </dt>
3260 <dd>
3262 If either of these environment variables is set then <em>git fetch</em>
3263 and <em>git push</em> will use the specified command instead of <em>ssh</em>
3264 when they need to connect to a remote system.
3265 The command-line parameters passed to the configured command are
3266 determined by the ssh variant. See <code>ssh.variant</code> option in
3267 <a href="git-config.html">git-config(1)</a> for details.
3268 </p>
3269 <div class="paragraph"><p><code>$GIT_SSH_COMMAND</code> takes precedence over <code>$GIT_SSH</code>, and is interpreted
3270 by the shell, which allows additional arguments to be included.
3271 <code>$GIT_SSH</code> on the other hand must be just the path to a program
3272 (which can be a wrapper shell script, if additional arguments are
3273 needed).</p></div>
3274 <div class="paragraph"><p>Usually it is easier to configure any desired options through your
3275 personal <code>.ssh/config</code> file. Please consult your ssh documentation
3276 for further details.</p></div>
3277 </dd>
3278 <dt class="hdlist1">
3279 <code>GIT_SSH_VARIANT</code>
3280 </dt>
3281 <dd>
3283 If this environment variable is set, it overrides Git&#8217;s autodetection
3284 whether <code>GIT_SSH</code>/<code>GIT_SSH_COMMAND</code>/<code>core.sshCommand</code> refer to OpenSSH,
3285 plink or tortoiseplink. This variable overrides the config setting
3286 <code>ssh.variant</code> that serves the same purpose.
3287 </p>
3288 </dd>
3289 <dt class="hdlist1">
3290 <code>GIT_SSL_NO_VERIFY</code>
3291 </dt>
3292 <dd>
3294 Setting and exporting this environment variable to any value
3295 tells Git not to verify the SSL certificate when fetching or
3296 pushing over HTTPS.
3297 </p>
3298 </dd>
3299 <dt class="hdlist1">
3300 <code>GIT_ATTR_SOURCE</code>
3301 </dt>
3302 <dd>
3304 Sets the treeish that gitattributes will be read from.
3305 </p>
3306 </dd>
3307 <dt class="hdlist1">
3308 <code>GIT_ASKPASS</code>
3309 </dt>
3310 <dd>
3312 If this environment variable is set, then Git commands which need to
3313 acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)
3314 will call this program with a suitable prompt as command-line argument
3315 and read the password from its STDOUT. See also the <code>core.askPass</code>
3316 option in <a href="git-config.html">git-config(1)</a>.
3317 </p>
3318 </dd>
3319 <dt class="hdlist1">
3320 <code>GIT_TERMINAL_PROMPT</code>
3321 </dt>
3322 <dd>
3324 If this Boolean environment variable is set to false, git will not prompt
3325 on the terminal (e.g., when asking for HTTP authentication).
3326 </p>
3327 </dd>
3328 <dt class="hdlist1">
3329 <code>GIT_CONFIG_GLOBAL</code>
3330 </dt>
3331 <dt class="hdlist1">
3332 <code>GIT_CONFIG_SYSTEM</code>
3333 </dt>
3334 <dd>
3336 Take the configuration from the given files instead from global or
3337 system-level configuration files. If <code>GIT_CONFIG_SYSTEM</code> is set, the
3338 system config file defined at build time (usually <code>/etc/gitconfig</code>)
3339 will not be read. Likewise, if <code>GIT_CONFIG_GLOBAL</code> is set, neither
3340 <code>$HOME/.gitconfig</code> nor <code>$XDG_CONFIG_HOME/git/config</code> will be read. Can
3341 be set to <code>/dev/null</code> to skip reading configuration files of the
3342 respective level.
3343 </p>
3344 </dd>
3345 <dt class="hdlist1">
3346 <code>GIT_CONFIG_NOSYSTEM</code>
3347 </dt>
3348 <dd>
3350 Whether to skip reading settings from the system-wide
3351 <code>$(prefix)/etc/gitconfig</code> file. This Boolean environment variable can
3352 be used along with <code>$HOME</code> and <code>$XDG_CONFIG_HOME</code> to create a
3353 predictable environment for a picky script, or you can set it
3354 to true to temporarily avoid using a buggy <code>/etc/gitconfig</code> file while
3355 waiting for someone with sufficient permissions to fix it.
3356 </p>
3357 </dd>
3358 <dt class="hdlist1">
3359 <code>GIT_FLUSH</code>
3360 </dt>
3361 <dd>
3363 If this Boolean environment variable is set to true, then commands such
3364 as <em>git blame</em> (in incremental mode), <em>git rev-list</em>, <em>git log</em>,
3365 <em>git check-attr</em> and <em>git check-ignore</em> will
3366 force a flush of the output stream after each record have been
3367 flushed. If this
3368 variable is set to false, the output of these commands will be done
3369 using completely buffered I/O. If this environment variable is
3370 not set, Git will choose buffered or record-oriented flushing
3371 based on whether stdout appears to be redirected to a file or not.
3372 </p>
3373 </dd>
3374 <dt class="hdlist1">
3375 <code>GIT_TRACE</code>
3376 </dt>
3377 <dd>
3379 Enables general trace messages, e.g. alias expansion, built-in
3380 command execution and external command execution.
3381 </p>
3382 <div class="paragraph"><p>If this variable is set to "1", "2" or "true" (comparison
3383 is case insensitive), trace messages will be printed to
3384 stderr.</p></div>
3385 <div class="paragraph"><p>If the variable is set to an integer value greater than 2
3386 and lower than 10 (strictly) then Git will interpret this
3387 value as an open file descriptor and will try to write the
3388 trace messages into this file descriptor.</p></div>
3389 <div class="paragraph"><p>Alternatively, if the variable is set to an absolute path
3390 (starting with a <em>/</em> character), Git will interpret this
3391 as a file path and will try to append the trace messages
3392 to it.</p></div>
3393 <div class="paragraph"><p>Unsetting the variable, or setting it to empty, "0" or
3394 "false" (case insensitive) disables trace messages.</p></div>
3395 </dd>
3396 <dt class="hdlist1">
3397 <code>GIT_TRACE_FSMONITOR</code>
3398 </dt>
3399 <dd>
3401 Enables trace messages for the filesystem monitor extension.
3402 See <code>GIT_TRACE</code> for available trace output options.
3403 </p>
3404 </dd>
3405 <dt class="hdlist1">
3406 <code>GIT_TRACE_PACK_ACCESS</code>
3407 </dt>
3408 <dd>
3410 Enables trace messages for all accesses to any packs. For each
3411 access, the pack file name and an offset in the pack is
3412 recorded. This may be helpful for troubleshooting some
3413 pack-related performance problems.
3414 See <code>GIT_TRACE</code> for available trace output options.
3415 </p>
3416 </dd>
3417 <dt class="hdlist1">
3418 <code>GIT_TRACE_PACKET</code>
3419 </dt>
3420 <dd>
3422 Enables trace messages for all packets coming in or out of a
3423 given program. This can help with debugging object negotiation
3424 or other protocol issues. Tracing is turned off at a packet
3425 starting with "PACK" (but see <code>GIT_TRACE_PACKFILE</code> below).
3426 See <code>GIT_TRACE</code> for available trace output options.
3427 </p>
3428 </dd>
3429 <dt class="hdlist1">
3430 <code>GIT_TRACE_PACKFILE</code>
3431 </dt>
3432 <dd>
3434 Enables tracing of packfiles sent or received by a
3435 given program. Unlike other trace output, this trace is
3436 verbatim: no headers, and no quoting of binary data. You almost
3437 certainly want to direct into a file (e.g.,
3438 <code>GIT_TRACE_PACKFILE=/tmp/my.pack</code>) rather than displaying it on
3439 the terminal or mixing it with other trace output.
3440 </p>
3441 <div class="paragraph"><p>Note that this is currently only implemented for the client side
3442 of clones and fetches.</p></div>
3443 </dd>
3444 <dt class="hdlist1">
3445 <code>GIT_TRACE_PERFORMANCE</code>
3446 </dt>
3447 <dd>
3449 Enables performance related trace messages, e.g. total execution
3450 time of each Git command.
3451 See <code>GIT_TRACE</code> for available trace output options.
3452 </p>
3453 </dd>
3454 <dt class="hdlist1">
3455 <code>GIT_TRACE_REFS</code>
3456 </dt>
3457 <dd>
3459 Enables trace messages for operations on the ref database.
3460 See <code>GIT_TRACE</code> for available trace output options.
3461 </p>
3462 </dd>
3463 <dt class="hdlist1">
3464 <code>GIT_TRACE_SETUP</code>
3465 </dt>
3466 <dd>
3468 Enables trace messages printing the .git, working tree and current
3469 working directory after Git has completed its setup phase.
3470 See <code>GIT_TRACE</code> for available trace output options.
3471 </p>
3472 </dd>
3473 <dt class="hdlist1">
3474 <code>GIT_TRACE_SHALLOW</code>
3475 </dt>
3476 <dd>
3478 Enables trace messages that can help debugging fetching /
3479 cloning of shallow repositories.
3480 See <code>GIT_TRACE</code> for available trace output options.
3481 </p>
3482 </dd>
3483 <dt class="hdlist1">
3484 <code>GIT_TRACE_CURL</code>
3485 </dt>
3486 <dd>
3488 Enables a curl full trace dump of all incoming and outgoing data,
3489 including descriptive information, of the git transport protocol.
3490 This is similar to doing curl <code>--trace-ascii</code> on the command line.
3491 See <code>GIT_TRACE</code> for available trace output options.
3492 </p>
3493 </dd>
3494 <dt class="hdlist1">
3495 <code>GIT_TRACE_CURL_NO_DATA</code>
3496 </dt>
3497 <dd>
3499 When a curl trace is enabled (see <code>GIT_TRACE_CURL</code> above), do not dump
3500 data (that is, only dump info lines and headers).
3501 </p>
3502 </dd>
3503 <dt class="hdlist1">
3504 <code>GIT_TRACE2</code>
3505 </dt>
3506 <dd>
3508 Enables more detailed trace messages from the "trace2" library.
3509 Output from <code>GIT_TRACE2</code> is a simple text-based format for human
3510 readability.
3511 </p>
3512 <div class="paragraph"><p>If this variable is set to "1", "2" or "true" (comparison
3513 is case insensitive), trace messages will be printed to
3514 stderr.</p></div>
3515 <div class="paragraph"><p>If the variable is set to an integer value greater than 2
3516 and lower than 10 (strictly) then Git will interpret this
3517 value as an open file descriptor and will try to write the
3518 trace messages into this file descriptor.</p></div>
3519 <div class="paragraph"><p>Alternatively, if the variable is set to an absolute path
3520 (starting with a <em>/</em> character), Git will interpret this
3521 as a file path and will try to append the trace messages
3522 to it. If the path already exists and is a directory, the
3523 trace messages will be written to files (one per process)
3524 in that directory, named according to the last component
3525 of the SID and an optional counter (to avoid filename
3526 collisions).</p></div>
3527 <div class="paragraph"><p>In addition, if the variable is set to
3528 <code>af_unix:[&lt;socket-type&gt;:]&lt;absolute-pathname&gt;</code>, Git will try
3529 to open the path as a Unix Domain Socket. The socket type
3530 can be either <code>stream</code> or <code>dgram</code>.</p></div>
3531 <div class="paragraph"><p>Unsetting the variable, or setting it to empty, "0" or
3532 "false" (case insensitive) disables trace messages.</p></div>
3533 <div class="paragraph"><p>See <a href="technical/api-trace2.html">Trace2 documentation</a>
3534 for full details.</p></div>
3535 </dd>
3536 <dt class="hdlist1">
3537 <code>GIT_TRACE2_EVENT</code>
3538 </dt>
3539 <dd>
3541 This setting writes a JSON-based format that is suited for machine
3542 interpretation.
3543 See <code>GIT_TRACE2</code> for available trace output options and
3544 <a href="technical/api-trace2.html">Trace2 documentation</a> for full details.
3545 </p>
3546 </dd>
3547 <dt class="hdlist1">
3548 <code>GIT_TRACE2_PERF</code>
3549 </dt>
3550 <dd>
3552 In addition to the text-based messages available in <code>GIT_TRACE2</code>, this
3553 setting writes a column-based format for understanding nesting
3554 regions.
3555 See <code>GIT_TRACE2</code> for available trace output options and
3556 <a href="technical/api-trace2.html">Trace2 documentation</a> for full details.
3557 </p>
3558 </dd>
3559 <dt class="hdlist1">
3560 <code>GIT_TRACE_REDACT</code>
3561 </dt>
3562 <dd>
3564 By default, when tracing is activated, Git redacts the values of
3565 cookies, the "Authorization:" header, the "Proxy-Authorization:"
3566 header and packfile URIs. Set this Boolean environment variable to false to prevent this
3567 redaction.
3568 </p>
3569 </dd>
3570 <dt class="hdlist1">
3571 <code>GIT_NO_REPLACE_OBJECTS</code>
3572 </dt>
3573 <dd>
3575 Setting and exporting this environment variable tells Git to
3576 ignore replacement refs and do not replace Git objects.
3577 </p>
3578 </dd>
3579 <dt class="hdlist1">
3580 <code>GIT_LITERAL_PATHSPECS</code>
3581 </dt>
3582 <dd>
3584 Setting this Boolean environment variable to true will cause Git to treat all
3585 pathspecs literally, rather than as glob patterns. For example,
3586 running <code>GIT_LITERAL_PATHSPECS=1 git log -- '*.c'</code> will search
3587 for commits that touch the path <code>*.c</code>, not any paths that the
3588 glob <code>*.c</code> matches. You might want this if you are feeding
3589 literal paths to Git (e.g., paths previously given to you by
3590 <code>git ls-tree</code>, <code>--raw</code> diff output, etc).
3591 </p>
3592 </dd>
3593 <dt class="hdlist1">
3594 <code>GIT_GLOB_PATHSPECS</code>
3595 </dt>
3596 <dd>
3598 Setting this Boolean environment variable to true will cause Git to treat all
3599 pathspecs as glob patterns (aka "glob" magic).
3600 </p>
3601 </dd>
3602 <dt class="hdlist1">
3603 <code>GIT_NOGLOB_PATHSPECS</code>
3604 </dt>
3605 <dd>
3607 Setting this Boolean environment variable to true will cause Git to treat all
3608 pathspecs as literal (aka "literal" magic).
3609 </p>
3610 </dd>
3611 <dt class="hdlist1">
3612 <code>GIT_ICASE_PATHSPECS</code>
3613 </dt>
3614 <dd>
3616 Setting this Boolean environment variable to true will cause Git to treat all
3617 pathspecs as case-insensitive.
3618 </p>
3619 </dd>
3620 <dt class="hdlist1">
3621 <code>GIT_NO_LAZY_FETCH</code>
3622 </dt>
3623 <dd>
3625 Setting this Boolean environment variable to true tells Git
3626 not to lazily fetch missing objects from the promisor remote
3627 on demand.
3628 </p>
3629 </dd>
3630 <dt class="hdlist1">
3631 <code>GIT_REFLOG_ACTION</code>
3632 </dt>
3633 <dd>
3635 When a ref is updated, reflog entries are created to keep
3636 track of the reason why the ref was updated (which is
3637 typically the name of the high-level command that updated
3638 the ref), in addition to the old and new values of the ref.
3639 A scripted Porcelain command can use set_reflog_action
3640 helper function in <code>git-sh-setup</code> to set its name to this
3641 variable when it is invoked as the top level command by the
3642 end user, to be recorded in the body of the reflog.
3643 </p>
3644 </dd>
3645 <dt class="hdlist1">
3646 <code>GIT_REF_PARANOIA</code>
3647 </dt>
3648 <dd>
3650 If this Boolean environment variable is set to false, ignore broken or badly named refs when iterating
3651 over lists of refs. Normally Git will try to include any such
3652 refs, which may cause some operations to fail. This is usually
3653 preferable, as potentially destructive operations (e.g.,
3654 <a href="git-prune.html">git-prune(1)</a>) are better off aborting rather than
3655 ignoring broken refs (and thus considering the history they
3656 point to as not worth saving). The default value is <code>1</code> (i.e.,
3657 be paranoid about detecting and aborting all operations). You
3658 should not normally need to set this to <code>0</code>, but it may be
3659 useful when trying to salvage data from a corrupted repository.
3660 </p>
3661 </dd>
3662 <dt class="hdlist1">
3663 <code>GIT_COMMIT_GRAPH_PARANOIA</code>
3664 </dt>
3665 <dd>
3667 When loading a commit object from the commit-graph, Git performs an
3668 existence check on the object in the object database. This is done to
3669 avoid issues with stale commit-graphs that contain references to
3670 already-deleted commits, but comes with a performance penalty.
3671 </p>
3672 <div class="paragraph"><p>The default is "false", which disables the aforementioned behavior.
3673 Setting this to "true" enables the existence check so that stale commits
3674 will never be returned from the commit-graph at the cost of performance.</p></div>
3675 </dd>
3676 <dt class="hdlist1">
3677 <code>GIT_ALLOW_PROTOCOL</code>
3678 </dt>
3679 <dd>
3681 If set to a colon-separated list of protocols, behave as if
3682 <code>protocol.allow</code> is set to <code>never</code>, and each of the listed
3683 protocols has <code>protocol.&lt;name&gt;.allow</code> set to <code>always</code>
3684 (overriding any existing configuration). See the description of
3685 <code>protocol.allow</code> in <a href="git-config.html">git-config(1)</a> for more details.
3686 </p>
3687 </dd>
3688 <dt class="hdlist1">
3689 <code>GIT_PROTOCOL_FROM_USER</code>
3690 </dt>
3691 <dd>
3693 Set this Boolean environment variable to false to prevent protocols used by fetch/push/clone which are
3694 configured to the <code>user</code> state. This is useful to restrict recursive
3695 submodule initialization from an untrusted repository or for programs
3696 which feed potentially-untrusted URLS to git commands. See
3697 <a href="git-config.html">git-config(1)</a> for more details.
3698 </p>
3699 </dd>
3700 <dt class="hdlist1">
3701 <code>GIT_PROTOCOL</code>
3702 </dt>
3703 <dd>
3705 For internal use only. Used in handshaking the wire protocol.
3706 Contains a colon <em>:</em> separated list of keys with optional values
3707 <em>&lt;key&gt;[=&lt;value&gt;]</em>. Presence of unknown keys and values must be
3708 ignored.
3709 </p>
3710 <div class="paragraph"><p>Note that servers may need to be configured to allow this variable to
3711 pass over some transports. It will be propagated automatically when
3712 accessing local repositories (i.e., <code>file://</code> or a filesystem path), as
3713 well as over the <code>git://</code> protocol. For git-over-http, it should work
3714 automatically in most configurations, but see the discussion in
3715 <a href="git-http-backend.html">git-http-backend(1)</a>. For git-over-ssh, the ssh server may need
3716 to be configured to allow clients to pass this variable (e.g., by using
3717 <code>AcceptEnv GIT_PROTOCOL</code> with OpenSSH).</p></div>
3718 <div class="paragraph"><p>This configuration is optional. If the variable is not propagated, then
3719 clients will fall back to the original "v0" protocol (but may miss out
3720 on some performance improvements or features). This variable currently
3721 only affects clones and fetches; it is not yet used for pushes (but may
3722 be in the future).</p></div>
3723 </dd>
3724 <dt class="hdlist1">
3725 <code>GIT_OPTIONAL_LOCKS</code>
3726 </dt>
3727 <dd>
3729 If this Boolean environment variable is set to false, Git will complete any requested operation without
3730 performing any optional sub-operations that require taking a lock.
3731 For example, this will prevent <code>git status</code> from refreshing the
3732 index as a side effect. This is useful for processes running in
3733 the background which do not want to cause lock contention with
3734 other operations on the repository. Defaults to <code>1</code>.
3735 </p>
3736 </dd>
3737 <dt class="hdlist1">
3738 <code>GIT_REDIRECT_STDIN</code>
3739 </dt>
3740 <dt class="hdlist1">
3741 <code>GIT_REDIRECT_STDOUT</code>
3742 </dt>
3743 <dt class="hdlist1">
3744 <code>GIT_REDIRECT_STDERR</code>
3745 </dt>
3746 <dd>
3748 Windows-only: allow redirecting the standard input/output/error
3749 handles to paths specified by the environment variables. This is
3750 particularly useful in multi-threaded applications where the
3751 canonical way to pass standard handles via <code>CreateProcess()</code> is
3752 not an option because it would require the handles to be marked
3753 inheritable (and consequently <strong>every</strong> spawned process would
3754 inherit them, possibly blocking regular Git operations). The
3755 primary intended use case is to use named pipes for communication
3756 (e.g. <code>\\.\pipe\my-git-stdin-123</code>).
3757 </p>
3758 <div class="paragraph"><p>Two special values are supported: <code>off</code> will simply close the
3759 corresponding standard handle, and if <code>GIT_REDIRECT_STDERR</code> is
3760 <code>2&gt;&amp;1</code>, standard error will be redirected to the same handle as
3761 standard output.</p></div>
3762 </dd>
3763 <dt class="hdlist1">
3764 <code>GIT_PRINT_SHA1_ELLIPSIS</code> (deprecated)
3765 </dt>
3766 <dd>
3768 If set to <code>yes</code>, print an ellipsis following an
3769 (abbreviated) SHA-1 value. This affects indications of
3770 detached HEADs (<a href="git-checkout.html">git-checkout(1)</a>) and the raw
3771 diff output (<a href="git-diff.html">git-diff(1)</a>). Printing an
3772 ellipsis in the cases mentioned is no longer considered
3773 adequate and support for it is likely to be removed in the
3774 foreseeable future (along with the variable).
3775 </p>
3776 </dd>
3777 </dl></div>
3778 </div>
3779 </div>
3780 </div>
3781 <div class="sect1">
3782 <h2 id="_discussion_a_id_discussion_a">Discussion<a id="Discussion"></a></h2>
3783 <div class="sectionbody">
3784 <div class="paragraph"><p>More detail on the following is available from the
3785 <a href="user-manual.html#git-concepts">Git concepts chapter of the
3786 user-manual</a> and <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>.</p></div>
3787 <div class="paragraph"><p>A Git project normally consists of a working directory with a ".git"
3788 subdirectory at the top level. The .git directory contains, among other
3789 things, a compressed object database representing the complete history
3790 of the project, an "index" file which links that history to the current
3791 contents of the working tree, and named pointers into that history such
3792 as tags and branch heads.</p></div>
3793 <div class="paragraph"><p>The object database contains objects of three main types: blobs, which
3794 hold file data; trees, which point to blobs and other trees to build up
3795 directory hierarchies; and commits, which each reference a single tree
3796 and some number of parent commits.</p></div>
3797 <div class="paragraph"><p>The commit, equivalent to what other systems call a "changeset" or
3798 "version", represents a step in the project&#8217;s history, and each parent
3799 represents an immediately preceding step. Commits with more than one
3800 parent represent merges of independent lines of development.</p></div>
3801 <div class="paragraph"><p>All objects are named by the SHA-1 hash of their contents, normally
3802 written as a string of 40 hex digits. Such names are globally unique.
3803 The entire history leading up to a commit can be vouched for by signing
3804 just that commit. A fourth object type, the tag, is provided for this
3805 purpose.</p></div>
3806 <div class="paragraph"><p>When first created, objects are stored in individual files, but for
3807 efficiency may later be compressed together into "pack files".</p></div>
3808 <div class="paragraph"><p>Named pointers called refs mark interesting points in history. A ref
3809 may contain the SHA-1 name of an object or the name of another ref (the
3810 latter is called a "symbolic ref").
3811 Refs with names beginning <code>refs/head/</code> contain the SHA-1 name of the most
3812 recent commit (or "head") of a branch under development. SHA-1 names of
3813 tags of interest are stored under <code>refs/tags/</code>. A symbolic ref named
3814 <code>HEAD</code> contains the name of the currently checked-out branch.</p></div>
3815 <div class="paragraph"><p>The index file is initialized with a list of all paths and, for each
3816 path, a blob object and a set of attributes. The blob object represents
3817 the contents of the file as of the head of the current branch. The
3818 attributes (last modified time, size, etc.) are taken from the
3819 corresponding file in the working tree. Subsequent changes to the
3820 working tree can be found by comparing these attributes. The index may
3821 be updated with new content, and new commits may be created from the
3822 content stored in the index.</p></div>
3823 <div class="paragraph"><p>The index is also capable of storing multiple entries (called "stages")
3824 for a given pathname. These stages are used to hold the various
3825 unmerged version of a file when a merge is in progress.</p></div>
3826 </div>
3827 </div>
3828 <div class="sect1">
3829 <h2 id="_security">SECURITY</h2>
3830 <div class="sectionbody">
3831 <div class="paragraph"><p>Some configuration options and hook files may cause Git to run arbitrary
3832 shell commands. Because configuration and hooks are not copied using
3833 <code>git clone</code>, it is generally safe to clone remote repositories with
3834 untrusted content, inspect them with <code>git log</code>, and so on.</p></div>
3835 <div class="paragraph"><p>However, it is not safe to run Git commands in a <code>.git</code> directory (or
3836 the working tree that surrounds it) when that <code>.git</code> directory itself
3837 comes from an untrusted source. The commands in its config and hooks
3838 are executed in the usual way.</p></div>
3839 <div class="paragraph"><p>By default, Git will refuse to run when the repository is owned by
3840 someone other than the user running the command. See the entry for
3841 <code>safe.directory</code> in <a href="git-config.html">git-config(1)</a>. While this can help protect
3842 you in a multi-user environment, note that you can also acquire
3843 untrusted repositories that are owned by you (for example, if you
3844 extract a zip file or tarball from an untrusted source). In such cases,
3845 you&#8217;d need to "sanitize" the untrusted repository first.</p></div>
3846 <div class="paragraph"><p>If you have an untrusted <code>.git</code> directory, you should first clone it
3847 with <code>git clone --no-local</code> to obtain a clean copy. Git does restrict
3848 the set of options and hooks that will be run by <code>upload-pack</code>, which
3849 handles the server side of a clone or fetch, but beware that the
3850 surface area for attack against <code>upload-pack</code> is large, so this does
3851 carry some risk. The safest thing is to serve the repository as an
3852 unprivileged user (either via <a href="git-daemon.html">git-daemon(1)</a>, ssh, or using
3853 other tools to change user ids). See the discussion in the <code>SECURITY</code>
3854 section of <a href="git-upload-pack.html">git-upload-pack(1)</a>.</p></div>
3855 </div>
3856 </div>
3857 <div class="sect1">
3858 <h2 id="_further_documentation">FURTHER DOCUMENTATION</h2>
3859 <div class="sectionbody">
3860 <div class="paragraph"><p>See the references in the "description" section to get started
3861 using Git. The following is probably more detail than necessary
3862 for a first-time user.</p></div>
3863 <div class="paragraph"><p>The <a href="user-manual.html#git-concepts">Git concepts chapter of the
3864 user-manual</a> and <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a> both provide
3865 introductions to the underlying Git architecture.</p></div>
3866 <div class="paragraph"><p>See <a href="gitworkflows.html">gitworkflows(7)</a> for an overview of recommended workflows.</p></div>
3867 <div class="paragraph"><p>See also the <a href="howto-index.html">howto</a> documents for some useful
3868 examples.</p></div>
3869 <div class="paragraph"><p>The internals are documented in the
3870 <a href="technical/api-index.html">Git API documentation</a>.</p></div>
3871 <div class="paragraph"><p>Users migrating from CVS may also want to
3872 read <a href="gitcvs-migration.html">gitcvs-migration(7)</a>.</p></div>
3873 </div>
3874 </div>
3875 <div class="sect1">
3876 <h2 id="_authors">Authors</h2>
3877 <div class="sectionbody">
3878 <div class="paragraph"><p>Git was started by Linus Torvalds, and is currently maintained by Junio
3879 C Hamano. Numerous contributions have come from the Git mailing list
3880 &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>
3881 gives you a more complete list of contributors.</p></div>
3882 <div class="paragraph"><p>If you have a clone of git.git itself, the
3883 output of <a href="git-shortlog.html">git-shortlog(1)</a> and <a href="git-blame.html">git-blame(1)</a> can show you
3884 the authors for specific parts of the project.</p></div>
3885 </div>
3886 </div>
3887 <div class="sect1">
3888 <h2 id="_reporting_bugs">Reporting Bugs</h2>
3889 <div class="sectionbody">
3890 <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
3891 development and maintenance is primarily done. You do not have to be
3892 subscribed to the list to send a message there. See the list archive
3893 at <a href="https://lore.kernel.org/git">https://lore.kernel.org/git</a> for previous bug reports and other
3894 discussions.</p></div>
3895 <div class="paragraph"><p>Issues which are security relevant should be disclosed privately to
3896 the Git Security mailing list &lt;<a href="mailto:git-security@googlegroups.com">git-security@googlegroups.com</a>&gt;.</p></div>
3897 </div>
3898 </div>
3899 <div class="sect1">
3900 <h2 id="_see_also">SEE ALSO</h2>
3901 <div class="sectionbody">
3902 <div class="paragraph"><p><a href="gittutorial.html">gittutorial(7)</a>, <a href="gittutorial-2.html">gittutorial-2(7)</a>,
3903 <a href="giteveryday.html">giteveryday(7)</a>, <a href="gitcvs-migration.html">gitcvs-migration(7)</a>,
3904 <a href="gitglossary.html">gitglossary(7)</a>, <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>,
3905 <a href="gitcli.html">gitcli(7)</a>, <a href="user-manual.html">The Git User&#8217;s Manual</a>,
3906 <a href="gitworkflows.html">gitworkflows(7)</a></p></div>
3907 </div>
3908 </div>
3909 <div class="sect1">
3910 <h2 id="_git">GIT</h2>
3911 <div class="sectionbody">
3912 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
3913 </div>
3914 </div>
3915 </div>
3916 <div id="footnotes"><hr /></div>
3917 <div id="footer">
3918 <div id="footer-text">
3919 Last updated
3920 2024-05-16 11:09:25 PDT
3921 </div>
3922 </div>
3923 </body>
3924 </html>