Autogenerated HTML docs for v2.41.0-rc0-4-g004e0
[git-htmldocs.git] / git-update-index.html
blob8997f1b4016d8d7e220fb85e3cad926546334251
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-update-index(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-update-index(1) Manual Page
739 </h1>
740 <h2>NAME</h2>
741 <div class="sectionbody">
742 <p>git-update-index -
743 Register file contents in the working tree to the index
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 update-index</em>
753 [--add] [--remove | --force-remove] [--replace]
754 [--refresh] [-q] [--unmerged] [--ignore-missing]
755 [(--cacheinfo &lt;mode&gt;,&lt;object&gt;,&lt;file&gt;)&#8230;]
756 [--chmod=(+|-)x]
757 [--[no-]assume-unchanged]
758 [--[no-]skip-worktree]
759 [--[no-]ignore-skip-worktree-entries]
760 [--[no-]fsmonitor-valid]
761 [--ignore-submodules]
762 [--[no-]split-index]
763 [--[no-|test-|force-]untracked-cache]
764 [--[no-]fsmonitor]
765 [--really-refresh] [--unresolve] [--again | -g]
766 [--info-only] [--index-info]
767 [-z] [--stdin] [--index-version &lt;n&gt;]
768 [--verbose]
769 [--] [&lt;file&gt;&#8230;]</pre>
770 <div class="attribution">
771 </div></div>
772 </div>
773 </div>
774 <div class="sect1">
775 <h2 id="_description">DESCRIPTION</h2>
776 <div class="sectionbody">
777 <div class="paragraph"><p>Modifies the index. Each file mentioned is updated into the index and
778 any <em>unmerged</em> or <em>needs updating</em> state is cleared.</p></div>
779 <div class="paragraph"><p>See also <a href="git-add.html">git-add(1)</a> for a more user-friendly way to do some of
780 the most common operations on the index.</p></div>
781 <div class="paragraph"><p>The way <em>git update-index</em> handles files it is told about can be modified
782 using the various options:</p></div>
783 </div>
784 </div>
785 <div class="sect1">
786 <h2 id="_options">OPTIONS</h2>
787 <div class="sectionbody">
788 <div class="dlist"><dl>
789 <dt class="hdlist1">
790 --add
791 </dt>
792 <dd>
794 If a specified file isn&#8217;t in the index already then it&#8217;s
795 added.
796 Default behaviour is to ignore new files.
797 </p>
798 </dd>
799 <dt class="hdlist1">
800 --remove
801 </dt>
802 <dd>
804 If a specified file is in the index but is missing then it&#8217;s
805 removed.
806 Default behavior is to ignore removed file.
807 </p>
808 </dd>
809 <dt class="hdlist1">
810 --refresh
811 </dt>
812 <dd>
814 Looks at the current index and checks to see if merges or
815 updates are needed by checking stat() information.
816 </p>
817 </dd>
818 <dt class="hdlist1">
820 </dt>
821 <dd>
823 Quiet. If --refresh finds that the index needs an update, the
824 default behavior is to error out. This option makes
825 <em>git update-index</em> continue anyway.
826 </p>
827 </dd>
828 <dt class="hdlist1">
829 --ignore-submodules
830 </dt>
831 <dd>
833 Do not try to update submodules. This option is only respected
834 when passed before --refresh.
835 </p>
836 </dd>
837 <dt class="hdlist1">
838 --unmerged
839 </dt>
840 <dd>
842 If --refresh finds unmerged changes in the index, the default
843 behavior is to error out. This option makes <em>git update-index</em>
844 continue anyway.
845 </p>
846 </dd>
847 <dt class="hdlist1">
848 --ignore-missing
849 </dt>
850 <dd>
852 Ignores missing files during a --refresh
853 </p>
854 </dd>
855 <dt class="hdlist1">
856 --cacheinfo &lt;mode&gt;,&lt;object&gt;,&lt;path&gt;
857 </dt>
858 <dt class="hdlist1">
859 --cacheinfo &lt;mode&gt; &lt;object&gt; &lt;path&gt;
860 </dt>
861 <dd>
863 Directly insert the specified info into the index. For
864 backward compatibility, you can also give these three
865 arguments as three separate parameters, but new users are
866 encouraged to use a single-parameter form.
867 </p>
868 </dd>
869 <dt class="hdlist1">
870 --index-info
871 </dt>
872 <dd>
874 Read index information from stdin.
875 </p>
876 </dd>
877 <dt class="hdlist1">
878 --chmod=(+|-)x
879 </dt>
880 <dd>
882 Set the execute permissions on the updated files.
883 </p>
884 </dd>
885 <dt class="hdlist1">
886 --[no-]assume-unchanged
887 </dt>
888 <dd>
890 When this flag is specified, the object names recorded
891 for the paths are not updated. Instead, this option
892 sets/unsets the "assume unchanged" bit for the
893 paths. When the "assume unchanged" bit is on, the user
894 promises not to change the file and allows Git to assume
895 that the working tree file matches what is recorded in
896 the index. If you want to change the working tree file,
897 you need to unset the bit to tell Git. This is
898 sometimes helpful when working with a big project on a
899 filesystem that has very slow lstat(2) system call
900 (e.g. cifs).
901 </p>
902 <div class="paragraph"><p>Git will fail (gracefully) in case it needs to modify this file
903 in the index e.g. when merging in a commit;
904 thus, in case the assumed-untracked file is changed upstream,
905 you will need to handle the situation manually.</p></div>
906 </dd>
907 <dt class="hdlist1">
908 --really-refresh
909 </dt>
910 <dd>
912 Like <code>--refresh</code>, but checks stat information unconditionally,
913 without regard to the "assume unchanged" setting.
914 </p>
915 </dd>
916 <dt class="hdlist1">
917 --[no-]skip-worktree
918 </dt>
919 <dd>
921 When one of these flags is specified, the object name recorded
922 for the paths are not updated. Instead, these options
923 set and unset the "skip-worktree" bit for the paths. See
924 section "Skip-worktree bit" below for more information.
925 </p>
926 </dd>
927 <dt class="hdlist1">
928 --[no-]ignore-skip-worktree-entries
929 </dt>
930 <dd>
932 Do not remove skip-worktree (AKA "index-only") entries even when
933 the <code>--remove</code> option was specified.
934 </p>
935 </dd>
936 <dt class="hdlist1">
937 --[no-]fsmonitor-valid
938 </dt>
939 <dd>
941 When one of these flags is specified, the object name recorded
942 for the paths are not updated. Instead, these options
943 set and unset the "fsmonitor valid" bit for the paths. See
944 section "File System Monitor" below for more information.
945 </p>
946 </dd>
947 <dt class="hdlist1">
949 </dt>
950 <dt class="hdlist1">
951 --again
952 </dt>
953 <dd>
955 Runs <em>git update-index</em> itself on the paths whose index
956 entries are different from those from the <code>HEAD</code> commit.
957 </p>
958 </dd>
959 <dt class="hdlist1">
960 --unresolve
961 </dt>
962 <dd>
964 Restores the <em>unmerged</em> or <em>needs updating</em> state of a
965 file during a merge if it was cleared by accident.
966 </p>
967 </dd>
968 <dt class="hdlist1">
969 --info-only
970 </dt>
971 <dd>
973 Do not create objects in the object database for all
974 &lt;file&gt; arguments that follow this flag; just insert
975 their object IDs into the index.
976 </p>
977 </dd>
978 <dt class="hdlist1">
979 --force-remove
980 </dt>
981 <dd>
983 Remove the file from the index even when the working directory
984 still has such a file. (Implies --remove.)
985 </p>
986 </dd>
987 <dt class="hdlist1">
988 --replace
989 </dt>
990 <dd>
992 By default, when a file <code>path</code> exists in the index,
993 <em>git update-index</em> refuses an attempt to add <code>path/file</code>.
994 Similarly if a file <code>path/file</code> exists, a file <code>path</code>
995 cannot be added. With --replace flag, existing entries
996 that conflict with the entry being added are
997 automatically removed with warning messages.
998 </p>
999 </dd>
1000 <dt class="hdlist1">
1001 --stdin
1002 </dt>
1003 <dd>
1005 Instead of taking list of paths from the command line,
1006 read list of paths from the standard input. Paths are
1007 separated by LF (i.e. one path per line) by default.
1008 </p>
1009 </dd>
1010 <dt class="hdlist1">
1011 --verbose
1012 </dt>
1013 <dd>
1015 Report what is being added and removed from index.
1016 </p>
1017 </dd>
1018 <dt class="hdlist1">
1019 --index-version &lt;n&gt;
1020 </dt>
1021 <dd>
1023 Write the resulting index out in the named on-disk format version.
1024 Supported versions are 2, 3 and 4. The current default version is 2
1025 or 3, depending on whether extra features are used, such as
1026 <code>git add -N</code>.
1027 </p>
1028 <div class="paragraph"><p>Version 4 performs a simple pathname compression that reduces index
1029 size by 30%-50% on large repositories, which results in faster load
1030 time. Version 4 is relatively young (first released in 1.8.0 in
1031 October 2012). Other Git implementations such as JGit and libgit2
1032 may not support it yet.</p></div>
1033 </dd>
1034 <dt class="hdlist1">
1036 </dt>
1037 <dd>
1039 Only meaningful with <code>--stdin</code> or <code>--index-info</code>; paths are
1040 separated with NUL character instead of LF.
1041 </p>
1042 </dd>
1043 <dt class="hdlist1">
1044 --split-index
1045 </dt>
1046 <dt class="hdlist1">
1047 --no-split-index
1048 </dt>
1049 <dd>
1051 Enable or disable split index mode. If split-index mode is
1052 already enabled and <code>--split-index</code> is given again, all
1053 changes in $GIT_DIR/index are pushed back to the shared index
1054 file.
1055 </p>
1056 <div class="paragraph"><p>These options take effect whatever the value of the <code>core.splitIndex</code>
1057 configuration variable (see <a href="git-config.html">git-config(1)</a>). But a warning is
1058 emitted when the change goes against the configured value, as the
1059 configured value will take effect next time the index is read and this
1060 will remove the intended effect of the option.</p></div>
1061 </dd>
1062 <dt class="hdlist1">
1063 --untracked-cache
1064 </dt>
1065 <dt class="hdlist1">
1066 --no-untracked-cache
1067 </dt>
1068 <dd>
1070 Enable or disable untracked cache feature. Please use
1071 <code>--test-untracked-cache</code> before enabling it.
1072 </p>
1073 <div class="paragraph"><p>These options take effect whatever the value of the <code>core.untrackedCache</code>
1074 configuration variable (see <a href="git-config.html">git-config(1)</a>). But a warning is
1075 emitted when the change goes against the configured value, as the
1076 configured value will take effect next time the index is read and this
1077 will remove the intended effect of the option.</p></div>
1078 </dd>
1079 <dt class="hdlist1">
1080 --test-untracked-cache
1081 </dt>
1082 <dd>
1084 Only perform tests on the working directory to make sure
1085 untracked cache can be used. You have to manually enable
1086 untracked cache using <code>--untracked-cache</code> or
1087 <code>--force-untracked-cache</code> or the <code>core.untrackedCache</code>
1088 configuration variable afterwards if you really want to use
1089 it. If a test fails the exit code is 1 and a message
1090 explains what is not working as needed, otherwise the exit
1091 code is 0 and OK is printed.
1092 </p>
1093 </dd>
1094 <dt class="hdlist1">
1095 --force-untracked-cache
1096 </dt>
1097 <dd>
1099 Same as <code>--untracked-cache</code>. Provided for backwards
1100 compatibility with older versions of Git where
1101 <code>--untracked-cache</code> used to imply <code>--test-untracked-cache</code> but
1102 this option would enable the extension unconditionally.
1103 </p>
1104 </dd>
1105 <dt class="hdlist1">
1106 --fsmonitor
1107 </dt>
1108 <dt class="hdlist1">
1109 --no-fsmonitor
1110 </dt>
1111 <dd>
1113 Enable or disable files system monitor feature. These options
1114 take effect whatever the value of the <code>core.fsmonitor</code>
1115 configuration variable (see <a href="git-config.html">git-config(1)</a>). But a warning
1116 is emitted when the change goes against the configured value, as
1117 the configured value will take effect next time the index is
1118 read and this will remove the intended effect of the option.
1119 </p>
1120 </dd>
1121 <dt class="hdlist1">
1123 </dt>
1124 <dd>
1126 Do not interpret any more arguments as options.
1127 </p>
1128 </dd>
1129 <dt class="hdlist1">
1130 &lt;file&gt;
1131 </dt>
1132 <dd>
1134 Files to act on.
1135 Note that files beginning with <em>.</em> are discarded. This includes
1136 <code>./file</code> and <code>dir/./file</code>. If you don&#8217;t want this, then use
1137 cleaner names.
1138 The same applies to directories ending <em>/</em> and paths with <em>//</em>
1139 </p>
1140 </dd>
1141 </dl></div>
1142 </div>
1143 </div>
1144 <div class="sect1">
1145 <h2 id="_using_refresh">USING --REFRESH</h2>
1146 <div class="sectionbody">
1147 <div class="paragraph"><p><code>--refresh</code> does not calculate a new sha1 file or bring the index
1148 up to date for mode/content changes. But what it <strong>does</strong> do is to
1149 "re-match" the stat information of a file with the index, so that you
1150 can refresh the index for a file that hasn&#8217;t been changed but where
1151 the stat entry is out of date.</p></div>
1152 <div class="paragraph"><p>For example, you&#8217;d want to do this after doing a <em>git read-tree</em>, to link
1153 up the stat index details with the proper files.</p></div>
1154 </div>
1155 </div>
1156 <div class="sect1">
1157 <h2 id="_using_cacheinfo_or_info_only">USING --CACHEINFO OR --INFO-ONLY</h2>
1158 <div class="sectionbody">
1159 <div class="paragraph"><p><code>--cacheinfo</code> is used to register a file that is not in the
1160 current working directory. This is useful for minimum-checkout
1161 merging.</p></div>
1162 <div class="paragraph"><p>To pretend you have a file at path with mode and sha1, say:</p></div>
1163 <div class="listingblock">
1164 <div class="content">
1165 <pre><code>$ git update-index --add --cacheinfo &lt;mode&gt;,&lt;sha1&gt;,&lt;path&gt;</code></pre>
1166 </div></div>
1167 <div class="paragraph"><p><code>--info-only</code> is used to register files without placing them in the object
1168 database. This is useful for status-only repositories.</p></div>
1169 <div class="paragraph"><p>Both <code>--cacheinfo</code> and <code>--info-only</code> behave similarly: the index is updated
1170 but the object database isn&#8217;t. <code>--cacheinfo</code> is useful when the object is
1171 in the database but the file isn&#8217;t available locally. <code>--info-only</code> is
1172 useful when the file is available, but you do not wish to update the
1173 object database.</p></div>
1174 </div>
1175 </div>
1176 <div class="sect1">
1177 <h2 id="_using_index_info">USING --INDEX-INFO</h2>
1178 <div class="sectionbody">
1179 <div class="paragraph"><p><code>--index-info</code> is a more powerful mechanism that lets you feed
1180 multiple entry definitions from the standard input, and designed
1181 specifically for scripts. It can take inputs of three formats:</p></div>
1182 <div class="olist arabic"><ol class="arabic">
1183 <li>
1185 mode SP type SP sha1 TAB path
1186 </p>
1187 <div class="paragraph"><p>This format is to stuff <code>git ls-tree</code> output into the index.</p></div>
1188 </li>
1189 <li>
1191 mode SP sha1 SP stage TAB path
1192 </p>
1193 <div class="paragraph"><p>This format is to put higher order stages into the
1194 index file and matches <em>git ls-files --stage</em> output.</p></div>
1195 </li>
1196 <li>
1198 mode SP sha1 TAB path
1199 </p>
1200 <div class="paragraph"><p>This format is no longer produced by any Git command, but is
1201 and will continue to be supported by <code>update-index --index-info</code>.</p></div>
1202 </li>
1203 </ol></div>
1204 <div class="paragraph"><p>To place a higher stage entry to the index, the path should
1205 first be removed by feeding a mode=0 entry for the path, and
1206 then feeding necessary input lines in the third format.</p></div>
1207 <div class="paragraph"><p>For example, starting with this index:</p></div>
1208 <div class="listingblock">
1209 <div class="content">
1210 <pre><code>$ git ls-files -s
1211 100644 8a1218a1024a212bb3db30becd860315f9f3ac52 0 frotz</code></pre>
1212 </div></div>
1213 <div class="paragraph"><p>you can feed the following input to <code>--index-info</code>:</p></div>
1214 <div class="listingblock">
1215 <div class="content">
1216 <pre><code>$ git update-index --index-info
1217 0 0000000000000000000000000000000000000000 frotz
1218 100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 frotz
1219 100755 8a1218a1024a212bb3db30becd860315f9f3ac52 2 frotz</code></pre>
1220 </div></div>
1221 <div class="paragraph"><p>The first line of the input feeds 0 as the mode to remove the
1222 path; the SHA-1 does not matter as long as it is well formatted.
1223 Then the second and third line feeds stage 1 and stage 2 entries
1224 for that path. After the above, we would end up with this:</p></div>
1225 <div class="listingblock">
1226 <div class="content">
1227 <pre><code>$ git ls-files -s
1228 100644 8a1218a1024a212bb3db30becd860315f9f3ac52 1 frotz
1229 100755 8a1218a1024a212bb3db30becd860315f9f3ac52 2 frotz</code></pre>
1230 </div></div>
1231 </div>
1232 </div>
1233 <div class="sect1">
1234 <h2 id="_using_8220_assume_unchanged_8221_bit">USING &#8220;ASSUME UNCHANGED&#8221; BIT</h2>
1235 <div class="sectionbody">
1236 <div class="paragraph"><p>Many operations in Git depend on your filesystem to have an
1237 efficient <code>lstat(2)</code> implementation, so that <code>st_mtime</code>
1238 information for working tree files can be cheaply checked to see
1239 if the file contents have changed from the version recorded in
1240 the index file. Unfortunately, some filesystems have
1241 inefficient <code>lstat(2)</code>. If your filesystem is one of them, you
1242 can set "assume unchanged" bit to paths you have not changed to
1243 cause Git not to do this check. Note that setting this bit on a
1244 path does not mean Git will check the contents of the file to
1245 see if it has changed&#8201;&#8212;&#8201;it makes Git to omit any checking and
1246 assume it has <strong>not</strong> changed. When you make changes to working
1247 tree files, you have to explicitly tell Git about it by dropping
1248 "assume unchanged" bit, either before or after you modify them.</p></div>
1249 <div class="paragraph"><p>In order to set "assume unchanged" bit, use <code>--assume-unchanged</code>
1250 option. To unset, use <code>--no-assume-unchanged</code>. To see which files
1251 have the "assume unchanged" bit set, use <code>git ls-files -v</code>
1252 (see <a href="git-ls-files.html">git-ls-files(1)</a>).</p></div>
1253 <div class="paragraph"><p>The command looks at <code>core.ignorestat</code> configuration variable. When
1254 this is true, paths updated with <code>git update-index paths...</code> and
1255 paths updated with other Git commands that update both index and
1256 working tree (e.g. <em>git apply --index</em>, <em>git checkout-index -u</em>,
1257 and <em>git read-tree -u</em>) are automatically marked as "assume
1258 unchanged". Note that "assume unchanged" bit is <strong>not</strong> set if
1259 <code>git update-index --refresh</code> finds the working tree file matches
1260 the index (use <code>git update-index --really-refresh</code> if you want
1261 to mark them as "assume unchanged").</p></div>
1262 <div class="paragraph"><p>Sometimes users confuse the assume-unchanged bit with the
1263 skip-worktree bit. See the final paragraph in the "Skip-worktree bit"
1264 section below for an explanation of the differences.</p></div>
1265 </div>
1266 </div>
1267 <div class="sect1">
1268 <h2 id="_examples">EXAMPLES</h2>
1269 <div class="sectionbody">
1270 <div class="paragraph"><p>To update and refresh only the files already checked out:</p></div>
1271 <div class="listingblock">
1272 <div class="content">
1273 <pre><code>$ git checkout-index -n -f -a &amp;&amp; git update-index --ignore-missing --refresh</code></pre>
1274 </div></div>
1275 <div class="dlist"><dl>
1276 <dt class="hdlist1">
1277 On an inefficient filesystem with <code>core.ignorestat</code> set
1278 </dt>
1279 <dd>
1280 <div class="listingblock">
1281 <div class="content">
1282 <pre><code>$ git update-index --really-refresh <b>&lt;1&gt;</b>
1283 $ git update-index --no-assume-unchanged foo.c <b>&lt;2&gt;</b>
1284 $ git diff --name-only <b>&lt;3&gt;</b>
1285 $ edit foo.c
1286 $ git diff --name-only <b>&lt;4&gt;</b>
1287 M foo.c
1288 $ git update-index foo.c <b>&lt;5&gt;</b>
1289 $ git diff --name-only <b>&lt;6&gt;</b>
1290 $ edit foo.c
1291 $ git diff --name-only <b>&lt;7&gt;</b>
1292 $ git update-index --no-assume-unchanged foo.c <b>&lt;8&gt;</b>
1293 $ git diff --name-only <b>&lt;9&gt;</b>
1294 M foo.c</code></pre>
1295 </div></div>
1296 <div class="colist arabic"><ol>
1297 <li>
1299 forces lstat(2) to set "assume unchanged" bits for paths that match index.
1300 </p>
1301 </li>
1302 <li>
1304 mark the path to be edited.
1305 </p>
1306 </li>
1307 <li>
1309 this does lstat(2) and finds index matches the path.
1310 </p>
1311 </li>
1312 <li>
1314 this does lstat(2) and finds index does <strong>not</strong> match the path.
1315 </p>
1316 </li>
1317 <li>
1319 registering the new version to index sets "assume unchanged" bit.
1320 </p>
1321 </li>
1322 <li>
1324 and it is assumed unchanged.
1325 </p>
1326 </li>
1327 <li>
1329 even after you edit it.
1330 </p>
1331 </li>
1332 <li>
1334 you can tell about the change after the fact.
1335 </p>
1336 </li>
1337 <li>
1339 now it checks with lstat(2) and finds it has been changed.
1340 </p>
1341 </li>
1342 </ol></div>
1343 </dd>
1344 </dl></div>
1345 </div>
1346 </div>
1347 <div class="sect1">
1348 <h2 id="_skip_worktree_bit">SKIP-WORKTREE BIT</h2>
1349 <div class="sectionbody">
1350 <div class="paragraph"><p>Skip-worktree bit can be defined in one (long) sentence: Tell git to
1351 avoid writing the file to the working directory when reasonably
1352 possible, and treat the file as unchanged when it is not
1353 present in the working directory.</p></div>
1354 <div class="paragraph"><p>Note that not all git commands will pay attention to this bit, and
1355 some only partially support it.</p></div>
1356 <div class="paragraph"><p>The update-index flags and the read-tree capabilities relating to the
1357 skip-worktree bit predated the introduction of the
1358 <a href="git-sparse-checkout.html">git-sparse-checkout(1)</a> command, which provides a much easier
1359 way to configure and handle the skip-worktree bits. If you want to
1360 reduce your working tree to only deal with a subset of the files in
1361 the repository, we strongly encourage the use of
1362 <a href="git-sparse-checkout.html">git-sparse-checkout(1)</a> in preference to the low-level
1363 update-index and read-tree primitives.</p></div>
1364 <div class="paragraph"><p>The primary purpose of the skip-worktree bit is to enable sparse
1365 checkouts, i.e. to have working directories with only a subset of
1366 paths present. When the skip-worktree bit is set, Git commands (such
1367 as <code>switch</code>, <code>pull</code>, <code>merge</code>) will avoid writing these files.
1368 However, these commands will sometimes write these files anyway in
1369 important cases such as conflicts during a merge or rebase. Git
1370 commands will also avoid treating the lack of such files as an
1371 intentional deletion; for example <code>git add -u</code> will not stage a
1372 deletion for these files and <code>git commit -a</code> will not make a commit
1373 deleting them either.</p></div>
1374 <div class="paragraph"><p>Although this bit looks similar to assume-unchanged bit, its goal is
1375 different. The assume-unchanged bit is for leaving the file in the
1376 working tree but having Git omit checking it for changes and presuming
1377 that the file has not been changed (though if it can determine without
1378 stat&#8217;ing the file that it has changed, it is free to record the
1379 changes). skip-worktree tells Git to ignore the absence of the file,
1380 avoid updating it when possible with commands that normally update
1381 much of the working directory (e.g. <code>checkout</code>, <code>switch</code>, <code>pull</code>,
1382 etc.), and not have its absence be recorded in commits. Note that in
1383 sparse checkouts (setup by <code>git sparse-checkout</code> or by configuring
1384 core.sparseCheckout to true), if a file is marked as skip-worktree in
1385 the index but is found in the working tree, Git will clear the
1386 skip-worktree bit for that file.</p></div>
1387 </div>
1388 </div>
1389 <div class="sect1">
1390 <h2 id="_split_index">SPLIT INDEX</h2>
1391 <div class="sectionbody">
1392 <div class="paragraph"><p>This mode is designed for repositories with very large indexes, and
1393 aims at reducing the time it takes to repeatedly write these indexes.</p></div>
1394 <div class="paragraph"><p>In this mode, the index is split into two files, $GIT_DIR/index and
1395 $GIT_DIR/sharedindex.&lt;SHA-1&gt;. Changes are accumulated in
1396 $GIT_DIR/index, the split index, while the shared index file contains
1397 all index entries and stays unchanged.</p></div>
1398 <div class="paragraph"><p>All changes in the split index are pushed back to the shared index
1399 file when the number of entries in the split index reaches a level
1400 specified by the splitIndex.maxPercentChange config variable (see
1401 <a href="git-config.html">git-config(1)</a>).</p></div>
1402 <div class="paragraph"><p>Each time a new shared index file is created, the old shared index
1403 files are deleted if their modification time is older than what is
1404 specified by the splitIndex.sharedIndexExpire config variable (see
1405 <a href="git-config.html">git-config(1)</a>).</p></div>
1406 <div class="paragraph"><p>To avoid deleting a shared index file that is still used, its
1407 modification time is updated to the current time every time a new split
1408 index based on the shared index file is either created or read from.</p></div>
1409 </div>
1410 </div>
1411 <div class="sect1">
1412 <h2 id="_untracked_cache">UNTRACKED CACHE</h2>
1413 <div class="sectionbody">
1414 <div class="paragraph"><p>This cache is meant to speed up commands that involve determining
1415 untracked files such as <code>git status</code>.</p></div>
1416 <div class="paragraph"><p>This feature works by recording the mtime of the working tree
1417 directories and then omitting reading directories and stat calls
1418 against files in those directories whose mtime hasn&#8217;t changed. For
1419 this to work the underlying operating system and file system must
1420 change the <code>st_mtime</code> field of directories if files in the directory
1421 are added, modified or deleted.</p></div>
1422 <div class="paragraph"><p>You can test whether the filesystem supports that with the
1423 <code>--test-untracked-cache</code> option. The <code>--untracked-cache</code> option used
1424 to implicitly perform that test in older versions of Git, but that&#8217;s
1425 no longer the case.</p></div>
1426 <div class="paragraph"><p>If you want to enable (or disable) this feature, it is easier to use
1427 the <code>core.untrackedCache</code> configuration variable (see
1428 <a href="git-config.html">git-config(1)</a>) than using the <code>--untracked-cache</code> option to
1429 <code>git update-index</code> in each repository, especially if you want to do so
1430 across all repositories you use, because you can set the configuration
1431 variable to <code>true</code> (or <code>false</code>) in your <code>$HOME/.gitconfig</code> just once
1432 and have it affect all repositories you touch.</p></div>
1433 <div class="paragraph"><p>When the <code>core.untrackedCache</code> configuration variable is changed, the
1434 untracked cache is added to or removed from the index the next time a
1435 command reads the index; while when <code>--[no-|force-]untracked-cache</code>
1436 are used, the untracked cache is immediately added to or removed from
1437 the index.</p></div>
1438 <div class="paragraph"><p>Before 2.17, the untracked cache had a bug where replacing a directory
1439 with a symlink to another directory could cause it to incorrectly show
1440 files tracked by git as untracked. See the "status: add a failing test
1441 showing a core.untrackedCache bug" commit to git.git. A workaround for
1442 that is (and this might work for other undiscovered bugs in the
1443 future):</p></div>
1444 <div class="listingblock">
1445 <div class="content">
1446 <pre><code>$ git -c core.untrackedCache=false status</code></pre>
1447 </div></div>
1448 <div class="paragraph"><p>This bug has also been shown to affect non-symlink cases of replacing
1449 a directory with a file when it comes to the internal structures of
1450 the untracked cache, but no case has been reported where this resulted in
1451 wrong "git status" output.</p></div>
1452 <div class="paragraph"><p>There are also cases where existing indexes written by git versions
1453 before 2.17 will reference directories that don&#8217;t exist anymore,
1454 potentially causing many "could not open directory" warnings to be
1455 printed on "git status". These are new warnings for existing issues
1456 that were previously silently discarded.</p></div>
1457 <div class="paragraph"><p>As with the bug described above the solution is to one-off do a "git
1458 status" run with <code>core.untrackedCache=false</code> to flush out the leftover
1459 bad data.</p></div>
1460 </div>
1461 </div>
1462 <div class="sect1">
1463 <h2 id="_file_system_monitor">FILE SYSTEM MONITOR</h2>
1464 <div class="sectionbody">
1465 <div class="paragraph"><p>This feature is intended to speed up git operations for repos that have
1466 large working directories.</p></div>
1467 <div class="paragraph"><p>It enables git to work together with a file system monitor (see
1468 <a href="git-fsmonitor&#45;&#45;daemon.html">git-fsmonitor&#45;&#45;daemon(1)</a>
1469 and the
1470 "fsmonitor-watchman" section of <a href="githooks.html">githooks(5)</a>) that can
1471 inform it as to what files have been modified. This enables git to avoid
1472 having to lstat() every file to find modified files.</p></div>
1473 <div class="paragraph"><p>When used in conjunction with the untracked cache, it can further improve
1474 performance by avoiding the cost of scanning the entire working directory
1475 looking for new files.</p></div>
1476 <div class="paragraph"><p>If you want to enable (or disable) this feature, it is easier to use
1477 the <code>core.fsmonitor</code> configuration variable (see
1478 <a href="git-config.html">git-config(1)</a>) than using the <code>--fsmonitor</code> option to <code>git
1479 update-index</code> in each repository, especially if you want to do so
1480 across all repositories you use, because you can set the configuration
1481 variable in your <code>$HOME/.gitconfig</code> just once and have it affect all
1482 repositories you touch.</p></div>
1483 <div class="paragraph"><p>When the <code>core.fsmonitor</code> configuration variable is changed, the
1484 file system monitor is added to or removed from the index the next time
1485 a command reads the index. When <code>--[no-]fsmonitor</code> are used, the file
1486 system monitor is immediately added to or removed from the index.</p></div>
1487 </div>
1488 </div>
1489 <div class="sect1">
1490 <h2 id="_configuration">CONFIGURATION</h2>
1491 <div class="sectionbody">
1492 <div class="paragraph"><p>The command honors <code>core.filemode</code> configuration variable. If
1493 your repository is on a filesystem whose executable bits are
1494 unreliable, this should be set to <em>false</em> (see <a href="git-config.html">git-config(1)</a>).
1495 This causes the command to ignore differences in file modes recorded
1496 in the index and the file mode on the filesystem if they differ only on
1497 executable bit. On such an unfortunate filesystem, you may
1498 need to use <em>git update-index --chmod=</em>.</p></div>
1499 <div class="paragraph"><p>Quite similarly, if <code>core.symlinks</code> configuration variable is set
1500 to <em>false</em> (see <a href="git-config.html">git-config(1)</a>), symbolic links are checked out
1501 as plain files, and this command does not modify a recorded file mode
1502 from symbolic link to regular file.</p></div>
1503 <div class="paragraph"><p>The command looks at <code>core.ignorestat</code> configuration variable. See
1504 <em>Using "assume unchanged" bit</em> section above.</p></div>
1505 <div class="paragraph"><p>The command also looks at <code>core.trustctime</code> configuration variable.
1506 It can be useful when the inode change time is regularly modified by
1507 something outside Git (file system crawlers and backup systems use
1508 ctime for marking files processed) (see <a href="git-config.html">git-config(1)</a>).</p></div>
1509 <div class="paragraph"><p>The untracked cache extension can be enabled by the
1510 <code>core.untrackedCache</code> configuration variable (see
1511 <a href="git-config.html">git-config(1)</a>).</p></div>
1512 </div>
1513 </div>
1514 <div class="sect1">
1515 <h2 id="_notes">NOTES</h2>
1516 <div class="sectionbody">
1517 <div class="paragraph"><p>Users often try to use the assume-unchanged and skip-worktree bits
1518 to tell Git to ignore changes to files that are tracked. This does not
1519 work as expected, since Git may still check working tree files against
1520 the index when performing certain operations. In general, Git does not
1521 provide a way to ignore changes to tracked files, so alternate solutions
1522 are recommended.</p></div>
1523 <div class="paragraph"><p>For example, if the file you want to change is some sort of config file,
1524 the repository can include a sample config file that can then be copied
1525 into the ignored name and modified. The repository can even include a
1526 script to treat the sample file as a template, modifying and copying it
1527 automatically.</p></div>
1528 </div>
1529 </div>
1530 <div class="sect1">
1531 <h2 id="_see_also">SEE ALSO</h2>
1532 <div class="sectionbody">
1533 <div class="paragraph"><p><a href="git-config.html">git-config(1)</a>,
1534 <a href="git-add.html">git-add(1)</a>,
1535 <a href="git-ls-files.html">git-ls-files(1)</a></p></div>
1536 </div>
1537 </div>
1538 <div class="sect1">
1539 <h2 id="_git">GIT</h2>
1540 <div class="sectionbody">
1541 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
1542 </div>
1543 </div>
1544 </div>
1545 <div id="footnotes"><hr /></div>
1546 <div id="footer">
1547 <div id="footer-text">
1548 Last updated
1549 2022-09-15 16:31:06 PDT
1550 </div>
1551 </div>
1552 </body>
1553 </html>