1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <meta name=
"generator" content=
"AsciiDoc 8.5.2" />
7 <title>git-diff-index(
1)
</title>
8 <style type=
"text/css">
10 p
, li
, dt
, dd
, div
, pre
, h1
, h2
, h3
, h4
, h5
, h6
{
12 border: 1px solid red;
17 margin: 1em 5% 1em 5%;
22 text-decoration: underline
;
42 h1
, h2
, h3
, h4
, h5
, h6
{
44 font-family: sans-serif
;
51 border-bottom: 2px solid silver
;
69 border: 1px solid silver
;
88 font-family: sans-serif
;
94 span#revnumber
, span#revdate
, span#revremark
{
95 font-family: sans-serif
;
99 font-family: sans-serif
;
101 border-top: 2px solid silver
;
107 padding-bottom: 0.5em;
111 padding-bottom: 0.5em;
116 margin-bottom: 1.5em;
118 div
.tableblock
, div
.imageblock
, div
.exampleblock
, div
.verseblock
,
119 div
.quoteblock
, div
.literalblock
, div
.listingblock
, div
.sidebarblock
,
120 div
.admonitionblock
{
122 margin-bottom: 1.5em;
124 div
.admonitionblock
{
126 margin-bottom: 2.0em;
131 div
.content
{ /* Block element content. */
135 /* Block element titles. */
136 div
.title
, caption
.title
{
138 font-family: sans-serif
;
142 margin-bottom: 0.5em;
148 td div
.title:first-child
{
151 div
.content div
.title:first-child
{
154 div
.content
+ div
.title
{
158 div
.sidebarblock
> div
.content
{
160 border: 1px solid silver
;
164 div
.listingblock
> div
.content
{
165 border: 1px solid silver
;
170 div
.quoteblock
, div
.verseblock
{
174 border-left: 5px solid
#dddddd;
178 div
.quoteblock
> div
.attribution
{
183 div
.verseblock
> div
.content
{
186 div
.verseblock
> div
.attribution
{
190 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
191 div
.verseblock
+ div
.attribution
{
195 div
.admonitionblock
.icon
{
199 text-decoration: underline
;
201 padding-right: 0.5em;
203 div
.admonitionblock td
.content
{
205 border-left: 3px solid
#dddddd;
208 div
.exampleblock
> div
.content
{
209 border-left: 3px solid
#dddddd;
213 div
.imageblock div
.content
{ padding-left: 0; }
214 span
.image img
{ border-style: none
; }
215 a
.image:visited
{ color: white
; }
219 margin-bottom: 0.8em;
232 list-style-position: outside
;
235 list-style-type: decimal
;
238 list-style-type: lower-alpha
;
241 list-style-type: upper-alpha
;
244 list-style-type: lower-roman
;
247 list-style-type: upper-roman
;
250 div
.compact ul
, div
.compact ol
,
251 div
.compact p
, div
.compact p
,
252 div
.compact div
, div
.compact div
{
254 margin-bottom: 0.1em;
257 div
.tableblock
> table
{
258 border: 3px solid
#527bbd;
260 thead
, p
.table
.header
{
261 font-family: sans-serif
;
273 /* Because the table frame attribute is overriden by CSS in most browsers. */
274 div
.tableblock
> table
[frame
="void"] {
277 div
.tableblock
> table
[frame
="hsides"] {
278 border-left-style: none
;
279 border-right-style: none
;
281 div
.tableblock
> table
[frame
="vsides"] {
282 border-top-style: none
;
283 border-bottom-style: none
;
289 margin-bottom: 0.8em;
292 padding-bottom: 15px;
294 dt
.hdlist1
.strong
, td
.hdlist1
.strong
{
300 padding-right: 0.8em;
306 div
.hdlist
.compact tr
{
315 .footnote, .footnoteref {
319 span
.footnote
, span
.footnoteref
{
320 vertical-align: super
;
324 margin: 20px 0 20px 0;
328 #footnotes div
.footnote
{
334 border-top: 1px solid silver
;
344 div#footer-badges
{ display: none
; }
348 margin-bottom: 2.5em;
353 font-family: sans-serif
;
357 margin-bottom: 0.1em;
360 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
376 /* Overrides for manpage documents */
379 padding-bottom: 0.5em;
380 border-top: 2px solid silver
;
381 border-bottom: 2px solid silver
;
391 div#toc
{ display: none
; }
394 /* Workarounds for IE6's broken and incomplete CSS2. */
396 div
.sidebar-content
{
398 border: 1px solid silver
;
401 div
.sidebar-title
, div
.image-title
{
403 font-family: sans-serif
;
406 margin-bottom: 0.5em;
409 div
.listingblock div
.content
{
410 border: 1px solid silver
;
415 div
.quoteblock-attribution
{
420 div
.verseblock-content
{
423 div
.verseblock-attribution
{
428 div
.exampleblock-content
{
429 border-left: 3px solid
#dddddd;
433 /* IE6 sets dynamically generated links as visited. */
434 div#toc
a:visited
{ color: blue
; }
436 <script type=
"text/javascript">
438 window
.onload = function(){asciidoc
.footnotes();}
439 var asciidoc
= { // Namespace.
441 /////////////////////////////////////////////////////////////////////
442 // Table Of Contents generator
443 /////////////////////////////////////////////////////////////////////
445 /* Author: Mihai Bazon, September 2002
446 * http://students.infoiasi.ro/~mishoo
448 * Table Of Content generator
451 * Feel free to use this script under the terms of the GNU General Public
452 * License, as long as you do not remove or alter this notice.
455 /* modified by Troy D. Hanson, September 2006. License: GPL */
456 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
459 toc: function (toclevels
) {
461 function getText(el
) {
463 for (var i
= el
.firstChild
; i
!= null; i
= i
.nextSibling
) {
464 if (i
.nodeType
== 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
466 else if (i
.firstChild
!= null)
472 function TocEntry(el
, text
, toclevel
) {
475 this.toclevel
= toclevel
;
478 function tocEntries(el
, toclevels
) {
479 var result
= new Array
;
480 var re
= new RegExp('[hH]([2-'+(toclevels
+1)+'])');
481 // Function that scans the DOM tree for header elements (the DOM2
482 // nodeIterator API would be a better technique but not supported by all
484 var iterate = function (el
) {
485 for (var i
= el
.firstChild
; i
!= null; i
= i
.nextSibling
) {
486 if (i
.nodeType
== 1 /* Node.ELEMENT_NODE */) {
487 var mo
= re
.exec(i
.tagName
);
488 if (mo
&& (i
.getAttribute("class") || i
.getAttribute("className")) != "float") {
489 result
[result
.length
] = new TocEntry(i
, getText(i
), mo
[1]-1);
499 var toc
= document
.getElementById("toc");
500 var entries
= tocEntries(document
.getElementById("content"), toclevels
);
501 for (var i
= 0; i
< entries
.length
; ++i
) {
502 var entry
= entries
[i
];
503 if (entry
.element
.id
== "")
504 entry
.element
.id
= "_toc_" + i
;
505 var a
= document
.createElement("a");
506 a
.href
= "#" + entry
.element
.id
;
507 a
.appendChild(document
.createTextNode(entry
.text
));
508 var div
= document
.createElement("div");
510 div
.className
= "toclevel" + entry
.toclevel
;
511 toc
.appendChild(div
);
513 if (entries
.length
== 0)
514 toc
.parentNode
.removeChild(toc
);
518 /////////////////////////////////////////////////////////////////////
519 // Footnotes generator
520 /////////////////////////////////////////////////////////////////////
522 /* Based on footnote generation code from:
523 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
526 footnotes: function () {
527 var cont
= document
.getElementById("content");
528 var noteholder
= document
.getElementById("footnotes");
529 var spans
= cont
.getElementsByTagName("span");
532 for (i
=0; i
<spans
.length
; i
++) {
533 if (spans
[i
].className
== "footnote") {
535 // Use [\s\S] in place of . so multi-line matches work.
536 // Because JavaScript has no s (dotall) regex flag.
537 note
= spans
[i
].innerHTML
.match(/\s*\[([\s\S]*)]\s*/)[1];
538 noteholder
.innerHTML
+=
539 "<div class='footnote' id='_footnote_" + n
+ "'>" +
540 "<a href='#_footnoteref_" + n
+ "' title='Return to text'>" +
541 n
+ "</a>. " + note
+ "</div>";
543 "[<a id='_footnoteref_" + n
+ "' href='#_footnote_" + n
+
544 "' title='View footnote' class='footnote'>" + n
+ "</a>]";
545 var id
=spans
[i
].getAttribute("id");
546 if (id
!= null) refs
["#"+id
] = n
;
550 noteholder
.parentNode
.removeChild(noteholder
);
552 // Process footnoterefs.
553 for (i
=0; i
<spans
.length
; i
++) {
554 if (spans
[i
].className
== "footnoteref") {
555 var href
= spans
[i
].getElementsByTagName("a")[0].getAttribute("href");
556 href
= href
.match(/#.*/)[0]; // Because IE return full URL.
559 "[<a href='#_footnote_" + n
+
560 "' title='View footnote' class='footnote'>" + n
+ "</a>]";
573 git-diff-index(
1) Manual Page
576 <div class=
"sectionbody">
578 Compares content and mode of blobs between the index and repository
583 <h2 id=
"_synopsis">SYNOPSIS
</h2>
584 <div class=
"sectionbody">
585 <div class=
"verseblock">
586 <div class=
"verseblock-content"><em>git diff-index
</em> [-m] [--cached] [
<common diff options
>]
<tree-ish
> [
<path
>…]
</div>
587 <div class=
"verseblock-attribution">
590 <h2 id=
"_description">DESCRIPTION
</h2>
591 <div class=
"sectionbody">
592 <div class=
"paragraph"><p>Compares the content and mode of the blobs found via a tree
593 object with the content of the current index and, optionally
594 ignoring the stat state of the file on disk. When paths are
595 specified, compares only those named paths. Otherwise all
596 entries in the index are compared.
</p></div>
598 <h2 id=
"_options">OPTIONS
</h2>
599 <div class=
"sectionbody">
600 <div class=
"dlist"><dl>
612 Generate patch (see section on generating patches).
624 Generate diffs with
<n
> lines of context instead of
634 Generate the raw format.
643 Synonym for
<tt>-p --raw
</tt>.
651 Spend extra time to make sure the smallest possible
660 Generate a diff using the
"patience diff" algorithm.
664 --stat[=
<width
>[,
<name-width
>[,
<count
>]]]
668 Generate a diffstat. You can override the default
669 output width for
80-column terminal by
<tt>--stat=
<width
></tt>.
670 The width of the filename part can be controlled by
671 giving another width to it separated by a comma.
672 By giving a third parameter
<tt><count
></tt>, you can limit the
673 output to the first
<tt><count
></tt> lines, followed by
674 <tt>…</tt> if there are more.
676 <div class=
"paragraph"><p>These parameters can also be set individually with
<tt>--stat-width=
<width
></tt>,
677 <tt>--stat-name-width=
<name-width
></tt> and
<tt>--stat-count=
<count
></tt>.
</p></div>
684 Similar to
<tt>--stat
</tt>, but shows number of added and
685 deleted lines in decimal notation and pathname without
686 abbreviation, to make it more machine friendly. For
687 binary files, outputs two
<tt>-
</tt> instead of saying
696 Output only the last line of the
<tt>--stat
</tt> format containing total
697 number of modified files, as well as number of added and deleted
702 --dirstat[=
<param1,param2,
…>]
706 Output the distribution of relative amount of changes for each
707 sub-directory. The behavior of
<tt>--dirstat
</tt> can be customized by
708 passing it a comma separated list of parameters.
709 The defaults are controlled by the
<tt>diff.dirstat
</tt> configuration
710 variable (see
<a href=
"git-config.html">git-config(
1)
</a>).
711 The following parameters are available:
713 <div class=
"dlist"><dl>
719 Compute the dirstat numbers by counting the lines that have been
720 removed from the source, or added to the destination. This ignores
721 the amount of pure code movements within a file. In other words,
722 rearranging lines in a file is not counted as much as other changes.
723 This is the default behavior when no parameter is given.
731 Compute the dirstat numbers by doing the regular line-based diff
732 analysis, and summing the removed/added line counts. (For binary
733 files, count
64-byte chunks instead, since binary files have no
734 natural concept of lines). This is a more expensive
<tt>--dirstat
</tt>
735 behavior than the
<tt>changes
</tt> behavior, but it does count rearranged
736 lines within a file as much as other changes. The resulting output
737 is consistent with what you get from the other
<tt>--*stat
</tt> options.
745 Compute the dirstat numbers by counting the number of files changed.
746 Each changed file counts equally in the dirstat analysis. This is
747 the computationally cheapest
<tt>--dirstat
</tt> behavior, since it does
748 not have to look at the file contents at all.
756 Count changes in a child directory for the parent directory as well.
757 Note that when using
<tt>cumulative
</tt>, the sum of the percentages
758 reported may exceed
100%. The default (non-cumulative) behavior can
759 be specified with the
<tt>noncumulative
</tt> parameter.
767 An integer parameter specifies a cut-off percent (
3% by default).
768 Directories contributing less than this percentage of the changes
769 are not shown in the output.
773 <div class=
"paragraph"><p>Example: The following will count changed files, while ignoring
774 directories with less than
10% of the total amount of changed files,
775 and accumulating child directory counts in the parent directories:
776 <tt>--dirstat=files,
10,cumulative
</tt>.
</p></div>
783 Output a condensed summary of extended header information
784 such as creations, renames and mode changes.
792 Synonym for
<tt>-p --stat
</tt>.
800 When
<tt>--raw
</tt>,
<tt>--numstat
</tt>,
<tt>--name-only
</tt> or
<tt>--name-status
</tt> has been
801 given, do not munge pathnames and use NULs as output field terminators.
803 <div class=
"paragraph"><p>Without this option, each pathname output will have TAB, LF, double quotes,
804 and backslash characters replaced with
<tt>\t
</tt>,
<tt>\n
</tt>,
<tt>\
"</tt>, and <tt>\\</tt>,
805 respectively, and the pathname will be enclosed in double quotes if
806 any of those replacements occurred.</p></div>
813 Show only names of changed files.
821 Show only names and status of changed files. See the description
822 of the <tt>--diff-filter</tt> option on what the status letters mean.
826 --submodule[=<format>]
830 Chose the output format for submodule differences. <format> can be one of
831 <em>short</em> and <em>log</em>. <em>short</em> just shows pairs of commit names, this format
832 is used when this option is not given. <em>log</em> is the default value for this
833 option and lists the commits in that commit range like the <em>summary</em>
834 option of <a href="git-submodule.html
">git-submodule(1)</a> does.
838 --color[=<when>]
843 The value must be <tt>always</tt> (the default for <tt><when></tt>), <tt>never</tt>, or <tt>auto</tt>.
844 The default value is <tt>never</tt>.
852 Turn off colored diff.
853 It is the same as <tt>--color=never</tt>.
857 --word-diff[=<mode>]
861 Show a word diff, using the <mode> to delimit changed words.
862 By default, words are delimited by whitespace; see
863 <tt>--word-diff-regex</tt> below. The <mode> defaults to <em>plain</em>, and
866 <div class="dlist
"><dl>
872 Highlight changed words using only colors. Implies <tt>--color</tt>.
880 Show words as <tt>[-removed-]</tt> and <tt>{<tt>added</tt>}</tt>. Makes no
881 attempts to escape the delimiters if they appear in the input,
882 so the output may be ambiguous.
890 Use a special line-based format intended for script
891 consumption. Added/removed/unchanged runs are printed in the
892 usual unified diff format, starting with a <tt>+</tt>/<tt>-</tt>/` `
893 character at the beginning of the line and extending to the
894 end of the line. Newlines in the input are represented by a
895 tilde <tt>~</tt> on a line of its own.
903 Disable word diff again.
907 <div class="paragraph
"><p>Note that despite the name of the first mode, color is used to
908 highlight the changed parts in all modes if enabled.</p></div>
911 --word-diff-regex=<regex>
915 Use <regex> to decide what a word is, instead of considering
916 runs of non-whitespace to be a word. Also implies
917 <tt>--word-diff</tt> unless it was already enabled.
919 <div class="paragraph
"><p>Every non-overlapping match of the
920 <regex> is considered a word. Anything between these matches is
921 considered whitespace and ignored(!) for the purposes of finding
922 differences. You may want to append <tt>|[^[:space:]]</tt> to your regular
923 expression to make sure that it matches all non-whitespace characters.
924 A match that contains a newline is silently truncated(!) at the
926 <div class="paragraph
"><p>The regex can also be set via a diff driver or configuration option, see
927 <a href="gitattributes.html
">gitattributes(1)</a> or <a href="git-config.html
">git-config(1)</a>. Giving it explicitly
928 overrides any diff driver or configuration setting. Diff drivers
929 override configuration settings.</p></div>
932 --color-words[=<regex>]
936 Equivalent to <tt>--word-diff=color</tt> plus (if a regex was
937 specified) <tt>--word-diff-regex=<regex></tt>.
945 Turn off rename detection, even when the configuration
946 file gives the default to do so.
954 Warn if changes introduce whitespace errors. What are
955 considered whitespace errors is controlled by <tt>core.whitespace</tt>
956 configuration. By default, trailing whitespaces (including
957 lines that solely consist of whitespaces) and a space character
958 that is immediately followed by a tab character inside the
959 initial indent of the line are considered whitespace errors.
960 Exits with non-zero status if problems are found. Not compatible
969 Instead of the first handful of characters, show the full
970 pre- and post-image blob object names on the "index
"
971 line when generating patch format output.
979 In addition to <tt>--full-index</tt>, output a binary diff that
980 can be applied with <tt>git-apply</tt>.
988 Instead of showing the full 40-byte hexadecimal object
989 name in diff-raw format output and diff-tree header
990 lines, show only a partial prefix. This is
991 independent of the <tt>--full-index</tt> option above, which controls
992 the diff-patch output format. Non default number of
993 digits can be specified with <tt>--abbrev=<n></tt>.
997 -B[<n>][/<m>]
1000 --break-rewrites[=[<n>][/<m>]]
1004 Break complete rewrite changes into pairs of delete and
1005 create. This serves two purposes:
1007 <div class="paragraph
"><p>It affects the way a change that amounts to a total rewrite of a file
1008 not as a series of deletion and insertion mixed together with a very
1009 few lines that happen to match textually as the context, but as a
1010 single deletion of everything old followed by a single insertion of
1011 everything new, and the number <tt>m</tt> controls this aspect of the -B
1012 option (defaults to 60%). <tt>-B/70%</tt> specifies that less than 30% of the
1013 original should remain in the result for git to consider it a total
1014 rewrite (i.e. otherwise the resulting patch will be a series of
1015 deletion and insertion mixed together with context lines).</p></div>
1016 <div class="paragraph
"><p>When used with -M, a totally-rewritten file is also considered as the
1017 source of a rename (usually -M only considers a file that disappeared
1018 as the source of a rename), and the number <tt>n</tt> controls this aspect of
1019 the -B option (defaults to 50%). <tt>-B20%</tt> specifies that a change with
1020 addition and deletion compared to 20% or more of the file’s size are
1021 eligible for being picked up as a possible source of a rename to
1022 another file.</p></div>
1024 <dt class="hdlist1
">
1027 <dt class="hdlist1
">
1028 --find-renames[=<n>]
1033 If <tt>n</tt> is specified, it is a threshold on the similarity
1034 index (i.e. amount of addition/deletions compared to the
1035 file’s size). For example, <tt>-M90%</tt> means git should consider a
1036 delete/add pair to be a rename if more than 90% of the file
1037 hasn’t changed.
1040 <dt class="hdlist1
">
1043 <dt class="hdlist1
">
1044 --find-copies[=<n>]
1048 Detect copies as well as renames. See also <tt>--find-copies-harder</tt>.
1049 If <tt>n</tt> is specified, it has the same meaning as for <tt>-M<n></tt>.
1052 <dt class="hdlist1
">
1053 --find-copies-harder
1057 For performance reasons, by default, <tt>-C</tt> option finds copies only
1058 if the original file of the copy was modified in the same
1059 changeset. This flag makes the command
1060 inspect unmodified files as candidates for the source of
1061 copy. This is a very expensive operation for large
1062 projects, so use it with caution. Giving more than one
1063 <tt>-C</tt> option has the same effect.
1066 <dt class="hdlist1
">
1069 <dt class="hdlist1
">
1070 --irreversible-delete
1074 Omit the preimage for deletes, i.e. print only the header but not
1075 the diff between the preimage and <tt>/dev/null</tt>. The resulting patch
1076 is not meant to be applied with <tt>patch</tt> nor <tt>git apply</tt>; this is
1077 solely for people who want to just concentrate on reviewing the
1078 text after the change. In addition, the output obviously lack
1079 enough information to apply such a patch in reverse, even manually,
1080 hence the name of the option.
1082 <div class="paragraph
"><p>When used together with <tt>-B</tt>, omit also the preimage in the deletion part
1083 of a delete/create pair.</p></div>
1085 <dt class="hdlist1
">
1090 The <tt>-M</tt> and <tt>-C</tt> options require O(n^2) processing time where n
1091 is the number of potential rename/copy targets. This
1092 option prevents rename/copy detection from running if
1093 the number of rename/copy targets exceeds the specified
1097 <dt class="hdlist1
">
1098 --diff-filter=[(A|C|D|M|R|T|U|X|B)…[*]]
1102 Select only files that are Added (<tt>A</tt>), Copied (<tt>C</tt>),
1103 Deleted (<tt>D</tt>), Modified (<tt>M</tt>), Renamed (<tt>R</tt>), have their
1104 type (i.e. regular file, symlink, submodule, …) changed (<tt>T</tt>),
1105 are Unmerged (<tt>U</tt>), are
1106 Unknown (<tt>X</tt>), or have had their pairing Broken (<tt>B</tt>).
1107 Any combination of the filter characters (including none) can be used.
1108 When <tt>*</tt> (All-or-none) is added to the combination, all
1109 paths are selected if there is any file that matches
1110 other criteria in the comparison; if there is no file
1111 that matches other criteria, nothing is selected.
1114 <dt class="hdlist1
">
1119 Look for differences that introduce or remove an instance of
1120 <string>. Note that this is different than the string simply
1121 appearing in diff output; see the <em>pickaxe</em> entry in
1122 <a href="gitdiffcore.html
">gitdiffcore(7)</a> for more details.
1125 <dt class="hdlist1
">
1130 Look for differences whose added or removed line matches
1131 the given <regex>.
1134 <dt class="hdlist1
">
1139 When <tt>-S</tt> or <tt>-G</tt> finds a change, show all the changes in that
1140 changeset, not just the files that contain the change
1144 <dt class="hdlist1
">
1149 Make the <string> not a plain string but an extended POSIX
1153 <dt class="hdlist1
">
1158 Output the patch in the order specified in the
1159 <orderfile>, which has one shell glob pattern per line.
1162 <dt class="hdlist1
">
1167 Swap two inputs; that is, show differences from index or
1168 on-disk file to tree contents.
1171 <dt class="hdlist1
">
1172 --relative[=<path>]
1176 When run from a subdirectory of the project, it can be
1177 told to exclude changes outside the directory and show
1178 pathnames relative to it with this option. When you are
1179 not in a subdirectory (e.g. in a bare repository), you
1180 can name which subdirectory to make the output relative
1181 to by giving a <path> as an argument.
1184 <dt class="hdlist1
">
1187 <dt class="hdlist1
">
1192 Treat all files as text.
1195 <dt class="hdlist1
">
1196 --ignore-space-at-eol
1200 Ignore changes in whitespace at EOL.
1203 <dt class="hdlist1
">
1206 <dt class="hdlist1
">
1207 --ignore-space-change
1211 Ignore changes in amount of whitespace. This ignores whitespace
1212 at line end, and considers all other sequences of one or
1213 more whitespace characters to be equivalent.
1216 <dt class="hdlist1
">
1219 <dt class="hdlist1
">
1224 Ignore whitespace when comparing lines. This ignores
1225 differences even if one line has whitespace where the other
1229 <dt class="hdlist1
">
1230 --inter-hunk-context=<lines>
1234 Show the context between diff hunks, up to the specified number
1235 of lines, thereby fusing hunks that are close to each other.
1238 <dt class="hdlist1
">
1243 Make the program exit with codes similar to diff(1).
1244 That is, it exits with 1 if there were differences and
1245 0 means no differences.
1248 <dt class="hdlist1
">
1253 Disable all output of the program. Implies <tt>--exit-code</tt>.
1256 <dt class="hdlist1
">
1261 Allow an external diff helper to be executed. If you set an
1262 external diff driver with <a href="gitattributes.html
">gitattributes(5)</a>, you need
1263 to use this option with <a href="git-log.html
">git-log(1)</a> and friends.
1266 <dt class="hdlist1
">
1271 Disallow external diff drivers.
1274 <dt class="hdlist1
">
1277 <dt class="hdlist1
">
1282 Allow (or disallow) external text conversion filters to be run
1283 when comparing binary files. See <a href="gitattributes.html
">gitattributes(5)</a> for
1284 details. Because textconv filters are typically a one-way
1285 conversion, the resulting diff is suitable for human
1286 consumption, but cannot be applied. For this reason, textconv
1287 filters are enabled by default only for <a href="git-diff.html
">git-diff(1)</a> and
1288 <a href="git-log.html
">git-log(1)</a>, but not for <a href="git-format-patch.html
">git-format-patch(1)</a> or
1289 diff plumbing commands.
1292 <dt class="hdlist1
">
1293 --ignore-submodules[=<when>]
1297 Ignore changes to submodules in the diff generation. <when> can be
1298 either "none
", "untracked
", "dirty
" or "all
", which is the default
1299 Using "none
" will consider the submodule modified when it either contains
1300 untracked or modified files or its HEAD differs from the commit recorded
1301 in the superproject and can be used to override any settings of the
1302 <em>ignore</em> option in <a href="git-config.html
">git-config(1)</a> or <a href="gitmodules.html
">gitmodules(5)</a>. When
1303 "untracked
" is used submodules are not considered dirty when they only
1304 contain untracked content (but they are still scanned for modified
1305 content). Using "dirty
" ignores all changes to the work tree of submodules,
1306 only changes to the commits stored in the superproject are shown (this was
1307 the behavior until 1.7.0). Using "all
" hides all changes to submodules.
1310 <dt class="hdlist1
">
1311 --src-prefix=<prefix>
1315 Show the given source prefix instead of "a/
".
1318 <dt class="hdlist1
">
1319 --dst-prefix=<prefix>
1323 Show the given destination prefix instead of "b/
".
1326 <dt class="hdlist1
">
1331 Do not show any source or destination prefix.
1335 <div class="paragraph
"><p>For more detailed explanation on these common options, see also
1336 <a href="gitdiffcore.html
">gitdiffcore(7)</a>.</p></div>
1337 <div class="dlist
"><dl>
1338 <dt class="hdlist1
">
1343 The id of a tree object to diff against.
1346 <dt class="hdlist1
">
1351 do not consider the on-disk file at all
1354 <dt class="hdlist1
">
1359 By default, files recorded in the index but not checked
1360 out are reported as deleted. This flag makes
1361 <em>git diff-index</em> say that all non-checked-out files are up
1367 <h2 id="_raw_output_format
">Raw output format</h2>
1368 <div class="sectionbody
">
1369 <div class="paragraph
"><p>The raw output format from "git-diff-index
", "git-diff-tree
",
1370 "git-diff-files
" and "git diff --raw
" are very similar.</p></div>
1371 <div class="paragraph
"><p>These commands all compare two sets of things; what is
1372 compared differs:</p></div>
1373 <div class="dlist
"><dl>
1374 <dt class="hdlist1
">
1375 git-diff-index <tree-ish>
1379 compares the <tree-ish> and the files on the filesystem.
1382 <dt class="hdlist1
">
1383 git-diff-index --cached <tree-ish>
1387 compares the <tree-ish> and the index.
1390 <dt class="hdlist1
">
1391 git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>…]
1395 compares the trees named by the two arguments.
1398 <dt class="hdlist1
">
1399 git-diff-files [<pattern>…]
1403 compares the index and the files on the filesystem.
1407 <div class="paragraph
"><p>The "git-diff-tree
" command begins its output by printing the hash of
1408 what is being compared. After that, all the commands print one output
1409 line per changed file.</p></div>
1410 <div class="paragraph
"><p>An output line is formatted this way:</p></div>
1411 <div class="listingblock
">
1412 <div class="content
">
1413 <pre><tt>in-place edit :100644 100644 bcd1234... 0123456... M file0
1414 copy-edit :100644 100644 abcd123... 1234567... C68 file1 file2
1415 rename-edit :100644 100644 abcd123... 1234567... R86 file1 file3
1416 create :000000 100644 0000000... 1234567... A file4
1417 delete :100644 000000 1234567... 0000000... D file5
1418 unmerged :000000 000000 0000000... 0000000... U file6</tt></pre>
1420 <div class="paragraph
"><p>That is, from the left to the right:</p></div>
1421 <div class="olist arabic
"><ol class="arabic
">
1429 mode for "src
"; 000000 if creation or unmerged.
1439 mode for "dst
"; 000000 if deletion or unmerged.
1449 sha1 for "src
"; 0{40} if creation or unmerged.
1459 sha1 for "dst
"; 0{40} if creation, unmerged or "look at work tree
".
1469 status, followed by optional "score
" number.
1474 a tab or a NUL when <em>-z</em> option is used.
1484 a tab or a NUL when <em>-z</em> option is used; only exists for C or R.
1489 path for "dst
"; only exists for C or R.
1494 an LF or a NUL when <em>-z</em> option is used, to terminate the record.
1498 <div class="paragraph
"><p>Possible status letters are:</p></div>
1499 <div class="ulist
"><ul>
1502 A: addition of a file
1507 C: copy of a file into a new one
1512 D: deletion of a file
1517 M: modification of the contents or mode of a file
1522 R: renaming of a file
1527 T: change in the type of the file
1532 U: file is unmerged (you must complete the merge before it can
1538 X: "unknown
" change type (most probably a bug, please report it)
1542 <div class="paragraph
"><p>Status letters C and R are always followed by a score (denoting the
1543 percentage of similarity between the source and target of the move or
1544 copy), and are the only ones to be so.</p></div>
1545 <div class="paragraph
"><p><sha1> is shown as all 0’s if a file is new on the filesystem
1546 and it is out of sync with the index.</p></div>
1547 <div class="paragraph
"><p>Example:</p></div>
1548 <div class="listingblock
">
1549 <div class="content
">
1550 <pre><tt>:100644 100644 5be4a4...... 000000...... M file.c</tt></pre>
1552 <div class="paragraph
"><p>When <tt>-z</tt> option is not used, TAB, LF, and backslash characters
1553 in pathnames are represented as <tt>\t</tt>, <tt>\n</tt>, and <tt>\\</tt>,
1554 respectively.</p></div>
1556 <h2 id="_diff_format_for_merges
">diff format for merges</h2>
1557 <div class="sectionbody
">
1558 <div class="paragraph
"><p>"git-diff-tree
", "git-diff-files
" and "git-diff --raw
"
1559 can take <em>-c</em> or <em>--cc</em> option
1560 to generate diff output also for merge commits. The output differs
1561 from the format described above in the following way:</p></div>
1562 <div class="olist arabic
"><ol class="arabic
">
1565 there is a colon for each parent
1570 there are more "src
" modes and "src
" sha1
1575 status is concatenated status characters for each parent
1580 no optional "score
" number
1585 single path, only for "dst
"
1589 <div class="paragraph
"><p>Example:</p></div>
1590 <div class="listingblock
">
1591 <div class="content
">
1592 <pre><tt>::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM describe.c</tt></pre>
1594 <div class="paragraph
"><p>Note that <em>combined diff</em> lists only files which were modified from
1595 all parents.</p></div>
1597 <h2 id="_generating_patches_with_p
">Generating patches with -p</h2>
1598 <div class="sectionbody
">
1599 <div class="paragraph
"><p>When "git-diff-index
", "git-diff-tree
", or "git-diff-files
" are run
1600 with a <em>-p</em> option, "git diff
" without the <em>--raw</em> option, or
1601 "git log
" with the "-p
" option, they
1602 do not produce the output described above; instead they produce a
1603 patch file. You can customize the creation of such patches via the
1604 GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p></div>
1605 <div class="paragraph
"><p>What the -p option produces is slightly different from the traditional
1606 diff format:</p></div>
1607 <div class="olist arabic
"><ol class="arabic
">
1610 It is preceded with a "git diff
" header that looks like this:
1612 <div class="literalblock
">
1613 <div class="content
">
1614 <pre><tt>diff --git a/file1 b/file2</tt></pre>
1616 <div class="paragraph
"><p>The <tt>a/</tt> and <tt>b/</tt> filenames are the same unless rename/copy is
1617 involved. Especially, even for a creation or a deletion,
1618 <tt>/dev/null</tt> is <em>not</em> used in place of the <tt>a/</tt> or <tt>b/</tt> filenames.</p></div>
1619 <div class="paragraph
"><p>When rename/copy is involved, <tt>file1</tt> and <tt>file2</tt> show the
1620 name of the source file of the rename/copy and the name of
1621 the file that rename/copy produces, respectively.</p></div>
1625 It is followed by one or more extended header lines:
1627 <div class="literalblock
">
1628 <div class="content
">
1629 <pre><tt>old mode <mode>
1630 new mode <mode>
1631 deleted file mode <mode>
1632 new file mode <mode>
1633 copy from <path>
1634 copy to <path>
1635 rename from <path>
1636 rename to <path>
1637 similarity index <number>
1638 dissimilarity index <number>
1639 index <hash>..<hash> <mode></tt></pre>
1641 <div class="paragraph
"><p>File modes are printed as 6-digit octal numbers including the file type
1642 and file permission bits.</p></div>
1643 <div class="paragraph
"><p>Path names in extended headers do not include the <tt>a/</tt> and <tt>b/</tt> prefixes.</p></div>
1644 <div class="paragraph
"><p>The similarity index is the percentage of unchanged lines, and
1645 the dissimilarity index is the percentage of changed lines. It
1646 is a rounded down integer, followed by a percent sign. The
1647 similarity index value of 100% is thus reserved for two equal
1648 files, while 100% dissimilarity means that no line from the old
1649 file made it into the new one.</p></div>
1650 <div class="paragraph
"><p>The index line includes the SHA-1 checksum before and after the change.
1651 The <mode> is included if the file mode does not change; otherwise,
1652 separate lines indicate the old and the new mode.</p></div>
1656 TAB, LF, double quote and backslash characters in pathnames
1657 are represented as <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt> and
<tt>\\
</tt>, respectively.
1658 If there is need for such substitution then the whole
1659 pathname is put in double quotes.
1664 All the
<tt>file1
</tt> files in the output refer to files before the
1665 commit, and all the
<tt>file2
</tt> files refer to files after the commit.
1666 It is incorrect to apply each change to each file sequentially. For
1667 example, this patch will swap a and b:
1669 <div class=
"literalblock">
1670 <div class=
"content">
1671 <pre><tt>diff --git a/a b/b
1676 rename to a
</tt></pre>
1681 <h2 id=
"_combined_diff_format">combined diff format
</h2>
1682 <div class=
"sectionbody">
1683 <div class=
"paragraph"><p>Any diff-generating command can take the
‘-c` or
<tt>--cc
</tt> option to
1684 produce a
<em>combined diff
</em> when showing a merge. This is the default
1685 format when showing merges with
<a href=
"git-diff.html">git-diff(
1)
</a> or
1686 <a href=
"git-show.html">git-show(
1)
</a>. Note also that you can give the `-m
’ option to any
1687 of these commands to force generation of diffs with individual parents
1688 of a merge.
</p></div>
1689 <div class=
"paragraph"><p>A
<em>combined diff
</em> format looks like this:
</p></div>
1690 <div class=
"listingblock">
1691 <div class=
"content">
1692 <pre><tt>diff --combined describe.c
1693 index fabadb8,cc95eb0.
.4866510
1696 @@@ -
98,
20 -
98,
12 +
98,
20 @@@
1697 return (a_date
> b_date) ? -
1 : (a_date == b_date) ?
0 :
1;
1700 - static void describe(char *arg)
1701 -static void describe(struct commit *cmit, int last_one)
1702 ++static void describe(char *arg, int last_one)
1704 + unsigned char sha1[
20];
1705 + struct commit *cmit;
1706 struct commit_list *list;
1707 static int initialized =
0;
1708 struct commit_name *n;
1710 + if (get_sha1(arg, sha1)
< 0)
1711 + usage(describe_usage);
1712 + cmit = lookup_commit_reference(sha1);
1714 + usage(describe_usage);
1718 for_each_ref(get_name);
</tt></pre>
1720 <div class=
"olist arabic"><ol class=
"arabic">
1723 It is preceded with a
"git diff" header, that looks like
1724 this (when
<em>-c
</em> option is used):
1726 <div class=
"literalblock">
1727 <div class=
"content">
1728 <pre><tt>diff --combined file
</tt></pre>
1730 <div class=
"paragraph"><p>or like this (when
<em>--cc
</em> option is used):
</p></div>
1731 <div class=
"literalblock">
1732 <div class=
"content">
1733 <pre><tt>diff --cc file
</tt></pre>
1738 It is followed by one or more extended header lines
1739 (this example shows a merge with two parents):
1741 <div class=
"literalblock">
1742 <div class=
"content">
1743 <pre><tt>index
<hash
>,
<hash
>..
<hash
>
1744 mode
<mode
>,
<mode
>..
<mode
>
1745 new file mode
<mode
>
1746 deleted file mode
<mode
>,
<mode
></tt></pre>
1748 <div class=
"paragraph"><p>The
<tt>mode
<mode
>,
<mode
>..
<mode
></tt> line appears only if at least one of
1749 the
<mode
> is different from the rest. Extended headers with
1750 information about detected contents movement (renames and
1751 copying detection) are designed to work with diff of two
1752 <tree-ish
> and are not used by combined diff format.
</p></div>
1756 It is followed by two-line from-file/to-file header
1758 <div class=
"literalblock">
1759 <div class=
"content">
1761 +++ b/file
</tt></pre>
1763 <div class=
"paragraph"><p>Similar to two-line header for traditional
<em>unified
</em> diff
1764 format,
<tt>/dev/null
</tt> is used to signal created or deleted
1769 Chunk header format is modified to prevent people from
1770 accidentally feeding it to
<tt>patch -p1
</tt>. Combined diff format
1771 was created for review of merge commit changes, and was not
1772 meant for apply. The change is similar to the change in the
1773 extended
<em>index
</em> header:
1775 <div class=
"literalblock">
1776 <div class=
"content">
1777 <pre><tt>@@@
<from-file-range
> <from-file-range
> <to-file-range
> @@@
</tt></pre>
1779 <div class=
"paragraph"><p>There are (number of parents +
1)
<tt>@
</tt> characters in the chunk
1780 header for combined diff format.
</p></div>
1783 <div class=
"paragraph"><p>Unlike the traditional
<em>unified
</em> diff format, which shows two
1784 files A and B with a single column that has
<tt>-
</tt> (minus
 — appears in A but removed in B),
<tt>+
</tt> (plus
 — missing in A but
1785 added to B), or
<tt>" "</tt> (space
 — unchanged) prefix, this format
1786 compares two or more files file1, file2,
… with one file X, and
1787 shows how X differs from each of fileN. One column for each of
1788 fileN is prepended to the output line to note how X
’s line is
1789 different from it.
</p></div>
1790 <div class=
"paragraph"><p>A
<tt>-
</tt> character in the column N means that the line appears in
1791 fileN but it does not appear in the result. A
<tt>+
</tt> character
1792 in the column N means that the line appears in the result,
1793 and fileN does not have that line (in other words, the line was
1794 added, from the point of view of that parent).
</p></div>
1795 <div class=
"paragraph"><p>In the above example output, the function signature was changed
1796 from both files (hence two
<tt>-
</tt> removals from both file1 and
1797 file2, plus
<tt>++
</tt> to mean one line that was added does not appear
1798 in either file1 nor file2). Also eight other lines are the same
1799 from file1 but do not appear in file2 (hence prefixed with
<tt>+</tt>).
</p></div>
1800 <div class=
"paragraph"><p>When shown by
<tt>git diff-tree -c
</tt>, it compares the parents of a
1801 merge commit with the merge result (i.e. file1..fileN are the
1802 parents). When shown by
<tt>git diff-files -c
</tt>, it compares the
1803 two unresolved merge parents with the working tree file
1804 (i.e. file1 is stage
2 aka
"our version", file2 is stage
3 aka
1805 "their version").
</p></div>
1807 <h2 id=
"_other_diff_formats">other diff formats
</h2>
1808 <div class=
"sectionbody">
1809 <div class=
"paragraph"><p>The
<tt>--summary
</tt> option describes newly added, deleted, renamed and
1810 copied files. The
<tt>--stat
</tt> option adds diffstat(
1) graph to the
1811 output. These options can be combined with other options, such as
1812 <tt>-p
</tt>, and are meant for human consumption.
</p></div>
1813 <div class=
"paragraph"><p>When showing a change that involves a rename or a copy,
<tt>--stat
</tt> output
1814 formats the pathnames compactly by combining common prefix and suffix of
1815 the pathnames. For example, a change that moves
<tt>arch/i386/Makefile
</tt> to
1816 <tt>arch/x86/Makefile
</tt> while modifying
4 lines will be shown like this:
</p></div>
1817 <div class=
"listingblock">
1818 <div class=
"content">
1819 <pre><tt>arch/{i386 =
> x86}/Makefile |
4 +--
</tt></pre>
1821 <div class=
"paragraph"><p>The
<tt>--numstat
</tt> option gives the diffstat(
1) information but is designed
1822 for easier machine consumption. An entry in
<tt>--numstat
</tt> output looks
1823 like this:
</p></div>
1824 <div class=
"listingblock">
1825 <div class=
"content">
1827 3 1 arch/{i386 =
> x86}/Makefile
</tt></pre>
1829 <div class=
"paragraph"><p>That is, from left to right:
</p></div>
1830 <div class=
"olist arabic"><ol class=
"arabic">
1833 the number of added lines;
1843 the number of deleted lines;
1853 pathname (possibly with rename/copy information);
1862 <div class=
"paragraph"><p>When
<tt>-z
</tt> output option is in effect, the output is formatted this way:
</p></div>
1863 <div class=
"listingblock">
1864 <div class=
"content">
1865 <pre><tt>1 2 README NUL
1866 3 1 NUL arch/i386/Makefile NUL arch/x86/Makefile NUL
</tt></pre>
1868 <div class=
"paragraph"><p>That is:
</p></div>
1869 <div class=
"olist arabic"><ol class=
"arabic">
1872 the number of added lines;
1882 the number of deleted lines;
1892 a NUL (only exists if renamed/copied);
1897 pathname in preimage;
1902 a NUL (only exists if renamed/copied);
1907 pathname in postimage (only exists if renamed/copied);
1916 <div class=
"paragraph"><p>The extra
<tt>NUL
</tt> before the preimage path in renamed case is to allow
1917 scripts that read the output to tell if the current record being read is
1918 a single-path record or a rename/copy record without reading ahead.
1919 After reading added and deleted lines, reading up to
<tt>NUL
</tt> would yield
1920 the pathname, but if that is
<tt>NUL
</tt>, the record will show two paths.
</p></div>
1922 <h2 id=
"_operating_modes">Operating Modes
</h2>
1923 <div class=
"sectionbody">
1924 <div class=
"paragraph"><p>You can choose whether you want to trust the index file entirely
1925 (using the
<em>--cached
</em> flag) or ask the diff logic to show any files
1926 that don
’t match the stat state as being
"tentatively changed". Both
1927 of these operations are very useful indeed.
</p></div>
1929 <h2 id=
"_cached_mode">Cached Mode
</h2>
1930 <div class=
"sectionbody">
1931 <div class=
"paragraph"><p>If
<em>--cached
</em> is specified, it allows you to ask:
</p></div>
1932 <div class=
"literalblock">
1933 <div class=
"content">
1934 <pre><tt>show me the differences between HEAD and the current index
1935 contents (the ones I'd write using 'git write-tree')
</tt></pre>
1937 <div class=
"paragraph"><p>For example, let
’s say that you have worked on your working directory, updated
1938 some files in the index and are ready to commit. You want to see exactly
1939 <strong>what
</strong> you are going to commit, without having to write a new tree
1940 object and compare it that way, and to do that, you just do
</p></div>
1941 <div class=
"literalblock">
1942 <div class=
"content">
1943 <pre><tt>git diff-index --cached HEAD
</tt></pre>
1945 <div class=
"paragraph"><p>Example: let
’s say I had renamed
<tt>commit.c
</tt> to
<tt>git-commit.c
</tt>, and I had
1946 done an
<tt>update-index
</tt> to make that effective in the index file.
1947 <tt>git diff-files
</tt> wouldn
’t show anything at all, since the index file
1948 matches my working directory. But doing a
<em>git diff-index
</em> does:
</p></div>
1949 <div class=
"literalblock">
1950 <div class=
"content">
1951 <pre><tt>torvalds@ppc970:~/git
> git diff-index --cached HEAD
1952 -
100644 blob
4161aecc6700a2eb579e842af0b7f22b98443f74 commit.c
1953 +
100644 blob
4161aecc6700a2eb579e842af0b7f22b98443f74 git-commit.c
</tt></pre>
1955 <div class=
"paragraph"><p>You can see easily that the above is a rename.
</p></div>
1956 <div class=
"paragraph"><p>In fact,
<tt>git diff-index --cached
</tt> <strong>should
</strong> always be entirely equivalent to
1957 actually doing a
<em>git write-tree
</em> and comparing that. Except this one is much
1958 nicer for the case where you just want to check where you are.
</p></div>
1959 <div class=
"paragraph"><p>So doing a
<tt>git diff-index --cached
</tt> is basically very useful when you are
1960 asking yourself
"what have I already marked for being committed, and
1961 what’s the difference to a previous tree".
</p></div>
1963 <h2 id=
"_non_cached_mode">Non-cached Mode
</h2>
1964 <div class=
"sectionbody">
1965 <div class=
"paragraph"><p>The
"non-cached" mode takes a different approach, and is potentially
1966 the more useful of the two in that what it does can
’t be emulated with
1967 a
<em>git write-tree
</em> +
<em>git diff-tree
</em>. Thus that
’s the default mode.
1968 The non-cached version asks the question:
</p></div>
1969 <div class=
"literalblock">
1970 <div class=
"content">
1971 <pre><tt>show me the differences between HEAD and the currently checked out
1972 tree - index contents _and_ files that aren't up-to-date
</tt></pre>
1974 <div class=
"paragraph"><p>which is obviously a very useful question too, since that tells you what
1975 you
<strong>could
</strong> commit. Again, the output matches the
<em>git diff-tree -r
</em>
1976 output to a tee, but with a twist.
</p></div>
1977 <div class=
"paragraph"><p>The twist is that if some file doesn
’t match the index, we don
’t have
1978 a backing store thing for it, and we use the magic
"all-zero" sha1 to
1979 show that. So let
’s say that you have edited
<tt>kernel/sched.c
</tt>, but
1980 have not actually done a
<em>git update-index
</em> on it yet - there is no
1981 "object" associated with the new state, and you get:
</p></div>
1982 <div class=
"literalblock">
1983 <div class=
"content">
1984 <pre><tt>torvalds@ppc970:~/v2.6/linux
> git diff-index --abbrev HEAD
1985 :
100644 100664 7476bb...
000000... kernel/sched.c
</tt></pre>
1987 <div class=
"paragraph"><p>i.e., it shows that the tree has changed, and that
<tt>kernel/sched.c
</tt> has is
1988 not up-to-date and may contain new stuff. The all-zero sha1 means that to
1989 get the real diff, you need to look at the object in the working directory
1990 directly rather than do an object-to-object diff.
</p></div>
1991 <div class=
"admonitionblock">
1994 <div class=
"title">Note
</div>
1996 <td class=
"content">As with other commands of this type,
<em>git diff-index
</em> does not
1997 actually look at the contents of the file at all. So maybe
1998 <tt>kernel/sched.c
</tt> hasn
’t actually changed, and it
’s just that you
1999 touched it. In either case, it
’s a note that you need to
2000 <em>git update-index
</em> it to make the index be in sync.
</td>
2003 <div class=
"admonitionblock">
2006 <div class=
"title">Note
</div>
2008 <td class=
"content">You can have a mixture of files show up as
"has been updated"
2009 and
"is still dirty in the working directory" together. You can always
2010 tell which file is in which state, since the
"has been updated" ones
2011 show a valid sha1, and the
"not in sync with the index" ones will
2012 always have the special all-zero sha1.
</td>
2016 <h2 id=
"_git">GIT
</h2>
2017 <div class=
"sectionbody">
2018 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
2021 <div id=
"footnotes"><hr /></div>
2023 <div id=
"footer-text">
2024 Last updated
2011-
09-
21 23:
01:
14 PDT