Autogenerated HTML docs for v2.43.0-334-gd4dbc
[git-htmldocs.git] / git-status.html
blob829aa59e38cf0b83fafaae52960d9810554452be
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-status(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-status(1) Manual Page
739 </h1>
740 <h2>NAME</h2>
741 <div class="sectionbody">
742 <p>git-status -
743 Show the working tree status
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 status</em> [&lt;options&gt;] [--] [&lt;pathspec&gt;&#8230;]</pre>
753 <div class="attribution">
754 </div></div>
755 </div>
756 </div>
757 <div class="sect1">
758 <h2 id="_description">DESCRIPTION</h2>
759 <div class="sectionbody">
760 <div class="paragraph"><p>Displays paths that have differences between the index file and the
761 current HEAD commit, paths that have differences between the working
762 tree and the index file, and paths in the working tree that are not
763 tracked by Git (and are not ignored by <a href="gitignore.html">gitignore(5)</a>). The first
764 are what you <em>would</em> commit by running <code>git commit</code>; the second and
765 third are what you <em>could</em> commit by running <em>git add</em> before running
766 <code>git commit</code>.</p></div>
767 </div>
768 </div>
769 <div class="sect1">
770 <h2 id="_options">OPTIONS</h2>
771 <div class="sectionbody">
772 <div class="dlist"><dl>
773 <dt class="hdlist1">
775 </dt>
776 <dt class="hdlist1">
777 --short
778 </dt>
779 <dd>
781 Give the output in the short-format.
782 </p>
783 </dd>
784 <dt class="hdlist1">
786 </dt>
787 <dt class="hdlist1">
788 --branch
789 </dt>
790 <dd>
792 Show the branch and tracking info even in short-format.
793 </p>
794 </dd>
795 <dt class="hdlist1">
796 --show-stash
797 </dt>
798 <dd>
800 Show the number of entries currently stashed away.
801 </p>
802 </dd>
803 <dt class="hdlist1">
804 --porcelain[=&lt;version&gt;]
805 </dt>
806 <dd>
808 Give the output in an easy-to-parse format for scripts.
809 This is similar to the short output, but will remain stable
810 across Git versions and regardless of user configuration. See
811 below for details.
812 </p>
813 <div class="paragraph"><p>The version parameter is used to specify the format version.
814 This is optional and defaults to the original version <em>v1</em> format.</p></div>
815 </dd>
816 <dt class="hdlist1">
817 --long
818 </dt>
819 <dd>
821 Give the output in the long-format. This is the default.
822 </p>
823 </dd>
824 <dt class="hdlist1">
826 </dt>
827 <dt class="hdlist1">
828 --verbose
829 </dt>
830 <dd>
832 In addition to the names of files that have been changed, also
833 show the textual changes that are staged to be committed
834 (i.e., like the output of <code>git diff --cached</code>). If <code>-v</code> is specified
835 twice, then also show the changes in the working tree that
836 have not yet been staged (i.e., like the output of <code>git diff</code>).
837 </p>
838 </dd>
839 <dt class="hdlist1">
840 -u[&lt;mode&gt;]
841 </dt>
842 <dt class="hdlist1">
843 --untracked-files[=&lt;mode&gt;]
844 </dt>
845 <dd>
847 Show untracked files.
848 </p>
849 <div class="openblock">
850 <div class="content">
851 <div class="paragraph"><p>The mode parameter is used to specify the handling of untracked files.
852 It is optional: it defaults to <em>all</em>, and if specified, it must be
853 stuck to the option (e.g. <code>-uno</code>, but not <code>-u no</code>).</p></div>
854 <div class="paragraph"><p>The possible options are:</p></div>
855 <div class="ulist"><ul>
856 <li>
858 <em>no</em> - Show no untracked files.
859 </p>
860 </li>
861 <li>
863 <em>normal</em> - Shows untracked files and directories.
864 </p>
865 </li>
866 <li>
868 <em>all</em> - Also shows individual files in untracked directories.
869 </p>
870 </li>
871 </ul></div>
872 <div class="paragraph"><p>When <code>-u</code> option is not used, untracked files and directories are
873 shown (i.e. the same as specifying <code>normal</code>), to help you avoid
874 forgetting to add newly created files. Because it takes extra work
875 to find untracked files in the filesystem, this mode may take some
876 time in a large working tree.
877 Consider enabling untracked cache and split index if supported (see
878 <code>git update-index --untracked-cache</code> and <code>git update-index
879 --split-index</code>), Otherwise you can use <code>no</code> to have <code>git status</code>
880 return more quickly without showing untracked files.</p></div>
881 <div class="paragraph"><p>The default can be changed using the status.showUntrackedFiles
882 configuration variable documented in <a href="git-config.html">git-config(1)</a>.</p></div>
883 </div></div>
884 </dd>
885 <dt class="hdlist1">
886 --ignore-submodules[=&lt;when&gt;]
887 </dt>
888 <dd>
890 Ignore changes to submodules when looking for changes. &lt;when&gt; can be
891 either "none", "untracked", "dirty" or "all", which is the default.
892 Using "none" will consider the submodule modified when it either contains
893 untracked or modified files or its HEAD differs from the commit recorded
894 in the superproject and can be used to override any settings of the
895 <em>ignore</em> option in <a href="git-config.html">git-config(1)</a> or <a href="gitmodules.html">gitmodules(5)</a>. When
896 "untracked" is used submodules are not considered dirty when they only
897 contain untracked content (but they are still scanned for modified
898 content). Using "dirty" ignores all changes to the work tree of submodules,
899 only changes to the commits stored in the superproject are shown (this was
900 the behavior before 1.7.0). Using "all" hides all changes to submodules
901 (and suppresses the output of submodule summaries when the config option
902 <code>status.submoduleSummary</code> is set).
903 </p>
904 </dd>
905 <dt class="hdlist1">
906 --ignored[=&lt;mode&gt;]
907 </dt>
908 <dd>
910 Show ignored files as well.
911 </p>
912 <div class="openblock">
913 <div class="content">
914 <div class="paragraph"><p>The mode parameter is used to specify the handling of ignored files.
915 It is optional: it defaults to <em>traditional</em>.</p></div>
916 <div class="paragraph"><p>The possible options are:</p></div>
917 <div class="ulist"><ul>
918 <li>
920 <em>traditional</em> - Shows ignored files and directories, unless
921 --untracked-files=all is specified, in which case
922 individual files in ignored directories are
923 displayed.
924 </p>
925 </li>
926 <li>
928 <em>no</em> - Show no ignored files.
929 </p>
930 </li>
931 <li>
933 <em>matching</em> - Shows ignored files and directories matching an
934 ignore pattern.
935 </p>
936 </li>
937 </ul></div>
938 <div class="paragraph"><p>When <em>matching</em> mode is specified, paths that explicitly match an
939 ignored pattern are shown. If a directory matches an ignore pattern,
940 then it is shown, but not paths contained in the ignored directory. If
941 a directory does not match an ignore pattern, but all contents are
942 ignored, then the directory is not shown, but all contents are shown.</p></div>
943 </div></div>
944 </dd>
945 <dt class="hdlist1">
947 </dt>
948 <dd>
950 Terminate entries with NUL, instead of LF. This implies
951 the <code>--porcelain=v1</code> output format if no other format is given.
952 </p>
953 </dd>
954 <dt class="hdlist1">
955 --column[=&lt;options&gt;]
956 </dt>
957 <dt class="hdlist1">
958 --no-column
959 </dt>
960 <dd>
962 Display untracked files in columns. See configuration variable
963 <code>column.status</code> for option syntax. <code>--column</code> and <code>--no-column</code>
964 without options are equivalent to <em>always</em> and <em>never</em>
965 respectively.
966 </p>
967 </dd>
968 <dt class="hdlist1">
969 --ahead-behind
970 </dt>
971 <dt class="hdlist1">
972 --no-ahead-behind
973 </dt>
974 <dd>
976 Display or do not display detailed ahead/behind counts for the
977 branch relative to its upstream branch. Defaults to true.
978 </p>
979 </dd>
980 <dt class="hdlist1">
981 --renames
982 </dt>
983 <dt class="hdlist1">
984 --no-renames
985 </dt>
986 <dd>
988 Turn on/off rename detection regardless of user configuration.
989 See also <a href="git-diff.html">git-diff(1)</a> <code>--no-renames</code>.
990 </p>
991 </dd>
992 <dt class="hdlist1">
993 --find-renames[=&lt;n&gt;]
994 </dt>
995 <dd>
997 Turn on rename detection, optionally setting the similarity
998 threshold.
999 See also <a href="git-diff.html">git-diff(1)</a> <code>--find-renames</code>.
1000 </p>
1001 </dd>
1002 <dt class="hdlist1">
1003 &lt;pathspec&gt;&#8230;
1004 </dt>
1005 <dd>
1007 See the <em>pathspec</em> entry in <a href="gitglossary.html">gitglossary(7)</a>.
1008 </p>
1009 </dd>
1010 </dl></div>
1011 </div>
1012 </div>
1013 <div class="sect1">
1014 <h2 id="_output">OUTPUT</h2>
1015 <div class="sectionbody">
1016 <div class="paragraph"><p>The output from this command is designed to be used as a commit
1017 template comment.
1018 The default, long format, is designed to be human readable,
1019 verbose and descriptive. Its contents and format are subject to change
1020 at any time.</p></div>
1021 <div class="paragraph"><p>The paths mentioned in the output, unlike many other Git commands, are
1022 made relative to the current directory if you are working in a
1023 subdirectory (this is on purpose, to help cutting and pasting). See
1024 the status.relativePaths config option below.</p></div>
1025 <div class="sect2">
1026 <h3 id="_short_format">Short Format</h3>
1027 <div class="paragraph"><p>In the short-format, the status of each path is shown as one of these
1028 forms</p></div>
1029 <div class="literalblock">
1030 <div class="content">
1031 <pre><code>XY PATH
1032 XY ORIG_PATH -&gt; PATH</code></pre>
1033 </div></div>
1034 <div class="paragraph"><p>where <code>ORIG_PATH</code> is where the renamed/copied contents came
1035 from. <code>ORIG_PATH</code> is only shown when the entry is renamed or
1036 copied. The <code>XY</code> is a two-letter status code.</p></div>
1037 <div class="paragraph"><p>The fields (including the <code>-&gt;</code>) are separated from each other by a
1038 single space. If a filename contains whitespace or other nonprintable
1039 characters, that field will be quoted in the manner of a C string
1040 literal: surrounded by ASCII double quote (34) characters, and with
1041 interior special characters backslash-escaped.</p></div>
1042 <div class="paragraph"><p>There are three different types of states that are shown using this format, and
1043 each one uses the <code>XY</code> syntax differently:</p></div>
1044 <div class="ulist"><ul>
1045 <li>
1047 When a merge is occurring and the merge was successful, or outside of a merge
1048 situation, <code>X</code> shows the status of the index and <code>Y</code> shows the status of the
1049 working tree.
1050 </p>
1051 </li>
1052 <li>
1054 When a merge conflict has occurred and has not yet been resolved, <code>X</code> and <code>Y</code>
1055 show the state introduced by each head of the merge, relative to the common
1056 ancestor. These paths are said to be <em>unmerged</em>.
1057 </p>
1058 </li>
1059 <li>
1061 When a path is untracked, <code>X</code> and <code>Y</code> are always the same, since they are
1062 unknown to the index. <code>??</code> is used for untracked paths. Ignored files are
1063 not listed unless <code>--ignored</code> is used; if it is, ignored files are indicated
1064 by <code>!!</code>.
1065 </p>
1066 </li>
1067 </ul></div>
1068 <div class="paragraph"><p>Note that the term <em>merge</em> here also includes rebases using the default
1069 <code>--merge</code> strategy, cherry-picks, and anything else using the merge machinery.</p></div>
1070 <div class="paragraph"><p>In the following table, these three classes are shown in separate sections, and
1071 these characters are used for <code>X</code> and <code>Y</code> fields for the first two sections that
1072 show tracked paths:</p></div>
1073 <div class="ulist"><ul>
1074 <li>
1076 ' ' = unmodified
1077 </p>
1078 </li>
1079 <li>
1081 <em>M</em> = modified
1082 </p>
1083 </li>
1084 <li>
1086 <em>T</em> = file type changed (regular file, symbolic link or submodule)
1087 </p>
1088 </li>
1089 <li>
1091 <em>A</em> = added
1092 </p>
1093 </li>
1094 <li>
1096 <em>D</em> = deleted
1097 </p>
1098 </li>
1099 <li>
1101 <em>R</em> = renamed
1102 </p>
1103 </li>
1104 <li>
1106 <em>C</em> = copied (if config option status.renames is set to "copies")
1107 </p>
1108 </li>
1109 <li>
1111 <em>U</em> = updated but unmerged
1112 </p>
1113 </li>
1114 </ul></div>
1115 <div class="literalblock">
1116 <div class="content">
1117 <pre><code>X Y Meaning
1118 -------------------------------------------------
1119 [AMD] not updated
1120 M [ MTD] updated in index
1121 T [ MTD] type changed in index
1122 A [ MTD] added to index
1123 D deleted from index
1124 R [ MTD] renamed in index
1125 C [ MTD] copied in index
1126 [MTARC] index and work tree matches
1127 [ MTARC] M work tree changed since index
1128 [ MTARC] T type changed in work tree since index
1129 [ MTARC] D deleted in work tree
1130 R renamed in work tree
1131 C copied in work tree
1132 -------------------------------------------------
1133 D D unmerged, both deleted
1134 A U unmerged, added by us
1135 U D unmerged, deleted by them
1136 U A unmerged, added by them
1137 D U unmerged, deleted by us
1138 A A unmerged, both added
1139 U U unmerged, both modified
1140 -------------------------------------------------
1141 ? ? untracked
1142 ! ! ignored
1143 -------------------------------------------------</code></pre>
1144 </div></div>
1145 <div class="paragraph"><p>Submodules have more state and instead report</p></div>
1146 <div class="ulist"><ul>
1147 <li>
1149 <em>M</em> = the submodule has a different HEAD than recorded in the index
1150 </p>
1151 </li>
1152 <li>
1154 <em>m</em> = the submodule has modified content
1155 </p>
1156 </li>
1157 <li>
1159 <em>?</em> = the submodule has untracked files
1160 </p>
1161 </li>
1162 </ul></div>
1163 <div class="paragraph"><p>This is since modified content or untracked files in a submodule cannot be added
1164 via <code>git add</code> in the superproject to prepare a commit.</p></div>
1165 <div class="paragraph"><p><em>m</em> and <em>?</em> are applied recursively. For example if a nested submodule
1166 in a submodule contains an untracked file, this is reported as <em>?</em> as well.</p></div>
1167 <div class="paragraph"><p>If -b is used the short-format status is preceded by a line</p></div>
1168 <div class="literalblock">
1169 <div class="content">
1170 <pre><code>## branchname tracking info</code></pre>
1171 </div></div>
1172 </div>
1173 <div class="sect2">
1174 <h3 id="_porcelain_format_version_1">Porcelain Format Version 1</h3>
1175 <div class="paragraph"><p>Version 1 porcelain format is similar to the short format, but is guaranteed
1176 not to change in a backwards-incompatible way between Git versions or
1177 based on user configuration. This makes it ideal for parsing by scripts.
1178 The description of the short format above also describes the porcelain
1179 format, with a few exceptions:</p></div>
1180 <div class="olist arabic"><ol class="arabic">
1181 <li>
1183 The user&#8217;s color.status configuration is not respected; color will
1184 always be off.
1185 </p>
1186 </li>
1187 <li>
1189 The user&#8217;s status.relativePaths configuration is not respected; paths
1190 shown will always be relative to the repository root.
1191 </p>
1192 </li>
1193 </ol></div>
1194 <div class="paragraph"><p>There is also an alternate -z format recommended for machine parsing. In
1195 that format, the status field is the same, but some other things
1196 change. First, the <em>-&gt;</em> is omitted from rename entries and the field
1197 order is reversed (e.g <em>from -&gt; to</em> becomes <em>to from</em>). Second, a NUL
1198 (ASCII 0) follows each filename, replacing space as a field separator
1199 and the terminating newline (but a space still separates the status
1200 field from the first filename). Third, filenames containing special
1201 characters are not specially formatted; no quoting or
1202 backslash-escaping is performed.</p></div>
1203 <div class="paragraph"><p>Any submodule changes are reported as modified <code>M</code> instead of <code>m</code> or single <code>?</code>.</p></div>
1204 </div>
1205 <div class="sect2">
1206 <h3 id="_porcelain_format_version_2">Porcelain Format Version 2</h3>
1207 <div class="paragraph"><p>Version 2 format adds more detailed information about the state of
1208 the worktree and changed items. Version 2 also defines an extensible
1209 set of easy to parse optional headers.</p></div>
1210 <div class="paragraph"><p>Header lines start with "#" and are added in response to specific
1211 command line arguments. Parsers should ignore headers they
1212 don&#8217;t recognize.</p></div>
1213 <div class="sect3">
1214 <h4 id="_branch_headers">Branch Headers</h4>
1215 <div class="paragraph"><p>If <code>--branch</code> is given, a series of header lines are printed with
1216 information about the current branch.</p></div>
1217 <div class="literalblock">
1218 <div class="content">
1219 <pre><code>Line Notes
1220 ------------------------------------------------------------
1221 # branch.oid &lt;commit&gt; | (initial) Current commit.
1222 # branch.head &lt;branch&gt; | (detached) Current branch.
1223 # branch.upstream &lt;upstream_branch&gt; If upstream is set.
1224 # branch.ab +&lt;ahead&gt; -&lt;behind&gt; If upstream is set and
1225 the commit is present.
1226 ------------------------------------------------------------</code></pre>
1227 </div></div>
1228 </div>
1229 <div class="sect3">
1230 <h4 id="_stash_information">Stash Information</h4>
1231 <div class="paragraph"><p>If <code>--show-stash</code> is given, one line is printed showing the number of stash
1232 entries if non-zero:</p></div>
1233 <div class="literalblock">
1234 <div class="content">
1235 <pre><code># stash &lt;N&gt;</code></pre>
1236 </div></div>
1237 </div>
1238 <div class="sect3">
1239 <h4 id="_changed_tracked_entries">Changed Tracked Entries</h4>
1240 <div class="paragraph"><p>Following the headers, a series of lines are printed for tracked
1241 entries. One of three different line formats may be used to describe
1242 an entry depending on the type of change. Tracked entries are printed
1243 in an undefined order; parsers should allow for a mixture of the 3
1244 line types in any order.</p></div>
1245 <div class="paragraph"><p>Ordinary changed entries have the following format:</p></div>
1246 <div class="literalblock">
1247 <div class="content">
1248 <pre><code>1 &lt;XY&gt; &lt;sub&gt; &lt;mH&gt; &lt;mI&gt; &lt;mW&gt; &lt;hH&gt; &lt;hI&gt; &lt;path&gt;</code></pre>
1249 </div></div>
1250 <div class="paragraph"><p>Renamed or copied entries have the following format:</p></div>
1251 <div class="literalblock">
1252 <div class="content">
1253 <pre><code>2 &lt;XY&gt; &lt;sub&gt; &lt;mH&gt; &lt;mI&gt; &lt;mW&gt; &lt;hH&gt; &lt;hI&gt; &lt;X&gt;&lt;score&gt; &lt;path&gt;&lt;sep&gt;&lt;origPath&gt;</code></pre>
1254 </div></div>
1255 <div class="literalblock">
1256 <div class="content">
1257 <pre><code>Field Meaning
1258 --------------------------------------------------------
1259 &lt;XY&gt; A 2 character field containing the staged and
1260 unstaged XY values described in the short format,
1261 with unchanged indicated by a "." rather than
1262 a space.
1263 &lt;sub&gt; A 4 character field describing the submodule state.
1264 "N..." when the entry is not a submodule.
1265 "S&lt;c&gt;&lt;m&gt;&lt;u&gt;" when the entry is a submodule.
1266 &lt;c&gt; is "C" if the commit changed; otherwise ".".
1267 &lt;m&gt; is "M" if it has tracked changes; otherwise ".".
1268 &lt;u&gt; is "U" if there are untracked changes; otherwise ".".
1269 &lt;mH&gt; The octal file mode in HEAD.
1270 &lt;mI&gt; The octal file mode in the index.
1271 &lt;mW&gt; The octal file mode in the worktree.
1272 &lt;hH&gt; The object name in HEAD.
1273 &lt;hI&gt; The object name in the index.
1274 &lt;X&gt;&lt;score&gt; The rename or copy score (denoting the percentage
1275 of similarity between the source and target of the
1276 move or copy). For example "R100" or "C75".
1277 &lt;path&gt; The pathname. In a renamed/copied entry, this
1278 is the target path.
1279 &lt;sep&gt; When the `-z` option is used, the 2 pathnames are separated
1280 with a NUL (ASCII 0x00) byte; otherwise, a tab (ASCII 0x09)
1281 byte separates them.
1282 &lt;origPath&gt; The pathname in the commit at HEAD or in the index.
1283 This is only present in a renamed/copied entry, and
1284 tells where the renamed/copied contents came from.
1285 --------------------------------------------------------</code></pre>
1286 </div></div>
1287 <div class="paragraph"><p>Unmerged entries have the following format; the first character is
1288 a "u" to distinguish from ordinary changed entries.</p></div>
1289 <div class="literalblock">
1290 <div class="content">
1291 <pre><code>u &lt;XY&gt; &lt;sub&gt; &lt;m1&gt; &lt;m2&gt; &lt;m3&gt; &lt;mW&gt; &lt;h1&gt; &lt;h2&gt; &lt;h3&gt; &lt;path&gt;</code></pre>
1292 </div></div>
1293 <div class="literalblock">
1294 <div class="content">
1295 <pre><code>Field Meaning
1296 --------------------------------------------------------
1297 &lt;XY&gt; A 2 character field describing the conflict type
1298 as described in the short format.
1299 &lt;sub&gt; A 4 character field describing the submodule state
1300 as described above.
1301 &lt;m1&gt; The octal file mode in stage 1.
1302 &lt;m2&gt; The octal file mode in stage 2.
1303 &lt;m3&gt; The octal file mode in stage 3.
1304 &lt;mW&gt; The octal file mode in the worktree.
1305 &lt;h1&gt; The object name in stage 1.
1306 &lt;h2&gt; The object name in stage 2.
1307 &lt;h3&gt; The object name in stage 3.
1308 &lt;path&gt; The pathname.
1309 --------------------------------------------------------</code></pre>
1310 </div></div>
1311 </div>
1312 <div class="sect3">
1313 <h4 id="_other_items">Other Items</h4>
1314 <div class="paragraph"><p>Following the tracked entries (and if requested), a series of
1315 lines will be printed for untracked and then ignored items
1316 found in the worktree.</p></div>
1317 <div class="paragraph"><p>Untracked items have the following format:</p></div>
1318 <div class="literalblock">
1319 <div class="content">
1320 <pre><code>? &lt;path&gt;</code></pre>
1321 </div></div>
1322 <div class="paragraph"><p>Ignored items have the following format:</p></div>
1323 <div class="literalblock">
1324 <div class="content">
1325 <pre><code>! &lt;path&gt;</code></pre>
1326 </div></div>
1327 </div>
1328 <div class="sect3">
1329 <h4 id="_pathname_format_notes_and_z">Pathname Format Notes and -z</h4>
1330 <div class="paragraph"><p>When the <code>-z</code> option is given, pathnames are printed as is and
1331 without any quoting and lines are terminated with a NUL (ASCII 0x00)
1332 byte.</p></div>
1333 <div class="paragraph"><p>Without the <code>-z</code> option, pathnames with "unusual" characters are
1334 quoted as explained for the configuration variable <code>core.quotePath</code>
1335 (see <a href="git-config.html">git-config(1)</a>).</p></div>
1336 </div>
1337 </div>
1338 </div>
1339 </div>
1340 <div class="sect1">
1341 <h2 id="_configuration">CONFIGURATION</h2>
1342 <div class="sectionbody">
1343 <div class="paragraph"><p>The command honors <code>color.status</code> (or <code>status.color</code>&#8201;&#8212;&#8201;they
1344 mean the same thing and the latter is kept for backward
1345 compatibility) and <code>color.status.&lt;slot&gt;</code> configuration variables
1346 to colorize its output.</p></div>
1347 <div class="paragraph"><p>If the config variable <code>status.relativePaths</code> is set to false, then all
1348 paths shown are relative to the repository root, not to the current
1349 directory.</p></div>
1350 <div class="paragraph"><p>If <code>status.submoduleSummary</code> is set to a non zero number or true (identical
1351 to -1 or an unlimited number), the submodule summary will be enabled for
1352 the long format and a summary of commits for modified submodules will be
1353 shown (see --summary-limit option of <a href="git-submodule.html">git-submodule(1)</a>). Please note
1354 that the summary output from the status command will be suppressed for all
1355 submodules when <code>diff.ignoreSubmodules</code> is set to <em>all</em> or only for those
1356 submodules where <code>submodule.&lt;name&gt;.ignore=all</code>. To also view the summary for
1357 ignored submodules you can either use the --ignore-submodules=dirty command
1358 line option or the <em>git submodule summary</em> command, which shows a similar
1359 output but does not honor these settings.</p></div>
1360 </div>
1361 </div>
1362 <div class="sect1">
1363 <h2 id="_background_refresh">BACKGROUND REFRESH</h2>
1364 <div class="sectionbody">
1365 <div class="paragraph"><p>By default, <code>git status</code> will automatically refresh the index, updating
1366 the cached stat information from the working tree and writing out the
1367 result. Writing out the updated index is an optimization that isn&#8217;t
1368 strictly necessary (<code>status</code> computes the values for itself, but writing
1369 them out is just to save subsequent programs from repeating our
1370 computation). When <code>status</code> is run in the background, the lock held
1371 during the write may conflict with other simultaneous processes, causing
1372 them to fail. Scripts running <code>status</code> in the background should consider
1373 using <code>git --no-optional-locks status</code> (see <a href="git.html">git(1)</a> for details).</p></div>
1374 </div>
1375 </div>
1376 <div class="sect1">
1377 <h2 id="_untracked_files_and_performance">UNTRACKED FILES AND PERFORMANCE</h2>
1378 <div class="sectionbody">
1379 <div class="paragraph"><p><code>git status</code> can be very slow in large worktrees if/when it
1380 needs to search for untracked files and directories. There are
1381 many configuration options available to speed this up by either
1382 avoiding the work or making use of cached results from previous
1383 Git commands. There is no single optimum set of settings right
1384 for everyone. We&#8217;ll list a summary of the relevant options to help
1385 you, but before going into the list, you may want to run <code>git status</code>
1386 again, because your configuration may already be caching <code>git status</code>
1387 results, so it could be faster on subsequent runs.</p></div>
1388 <div class="ulist"><ul>
1389 <li>
1391 The <code>--untracked-files=no</code> flag or the
1392 <code>status.showUntrackedfiles=false</code> config (see above for both):
1393 indicate that <code>git status</code> should not report untracked
1394 files. This is the fastest option. <code>git status</code> will not list
1395 the untracked files, so you need to be careful to remember if
1396 you create any new files and manually <code>git add</code> them.
1397 </p>
1398 </li>
1399 <li>
1401 <code>advice.statusUoption=false</code> (see <a href="git-config.html">git-config(1)</a>):
1402 setting this variable to <code>false</code> disables the warning message
1403 given when enumerating untracked files takes more than 2
1404 seconds. In a large project, it may take longer and the user
1405 may have already accepted the trade off (e.g. using "-uno" may
1406 not be an acceptable option for the user), in which case, there
1407 is no point issuing the warning message, and in such a case,
1408 disabling the warning may be the best.
1409 </p>
1410 </li>
1411 <li>
1413 <code>core.untrackedCache=true</code> (see <a href="git-update-index.html">git-update-index(1)</a>):
1414 enable the untracked cache feature and only search directories
1415 that have been modified since the previous <code>git status</code> command.
1416 Git remembers the set of untracked files within each directory
1417 and assumes that if a directory has not been modified, then
1418 the set of untracked files within has not changed. This is much
1419 faster than enumerating the contents of every directory, but still
1420 not without cost, because Git still has to search for the set of
1421 modified directories. The untracked cache is stored in the
1422 <code>.git/index</code> file. The reduced cost of searching for untracked
1423 files is offset slightly by the increased size of the index and
1424 the cost of keeping it up-to-date. That reduced search time is
1425 usually worth the additional size.
1426 </p>
1427 </li>
1428 <li>
1430 <code>core.untrackedCache=true</code> and <code>core.fsmonitor=true</code> or
1431 <code>core.fsmonitor=&lt;hook_command_pathname&gt;</code> (see
1432 <a href="git-update-index.html">git-update-index(1)</a>): enable both the untracked cache
1433 and FSMonitor features and only search directories that have
1434 been modified since the previous <code>git status</code> command. This
1435 is faster than using just the untracked cache alone because
1436 Git can also avoid searching for modified directories. Git
1437 only has to enumerate the exact set of directories that have
1438 changed recently. While the FSMonitor feature can be enabled
1439 without the untracked cache, the benefits are greatly reduced
1440 in that case.
1441 </p>
1442 </li>
1443 </ul></div>
1444 <div class="paragraph"><p>Note that after you turn on the untracked cache and/or FSMonitor
1445 features it may take a few <code>git status</code> commands for the various
1446 caches to warm up before you see improved command times. This is
1447 normal.</p></div>
1448 </div>
1449 </div>
1450 <div class="sect1">
1451 <h2 id="_see_also">SEE ALSO</h2>
1452 <div class="sectionbody">
1453 <div class="paragraph"><p><a href="gitignore.html">gitignore(5)</a></p></div>
1454 </div>
1455 </div>
1456 <div class="sect1">
1457 <h2 id="_git">GIT</h2>
1458 <div class="sectionbody">
1459 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
1460 </div>
1461 </div>
1462 </div>
1463 <div id="footnotes"><hr /></div>
1464 <div id="footer">
1465 <div id="footer-text">
1466 Last updated
1467 2023-10-23 14:43:46 PDT
1468 </div>
1469 </div>
1470 </body>
1471 </html>