Autogenerated HTML docs for v1.7.4.1-176-g501cc
[git/jnareb-git.git] / git-log.html
blob2a5515026912b2bd0d16d0e6cc34f2bbfcd14c40
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">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <meta name="generator" content="AsciiDoc 8.4.5" />
7 <title>git-log(1)</title>
8 <style type="text/css">
9 /* Debug borders */
10 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
12 border: 1px solid red;
16 body {
17 margin: 1em 5% 1em 5%;
20 a {
21 color: blue;
22 text-decoration: underline;
24 a:visited {
25 color: fuchsia;
28 em {
29 font-style: italic;
30 color: navy;
33 strong {
34 font-weight: bold;
35 color: #083194;
38 tt {
39 color: navy;
42 h1, h2, h3, h4, h5, h6 {
43 color: #527bbd;
44 font-family: sans-serif;
45 margin-top: 1.2em;
46 margin-bottom: 0.5em;
47 line-height: 1.3;
50 h1, h2, h3 {
51 border-bottom: 2px solid silver;
53 h2 {
54 padding-top: 0.5em;
56 h3 {
57 float: left;
59 h3 + * {
60 clear: left;
63 div.sectionbody {
64 font-family: serif;
65 margin-left: 0;
68 hr {
69 border: 1px solid silver;
72 p {
73 margin-top: 0.5em;
74 margin-bottom: 0.5em;
77 ul, ol, li > p {
78 margin-top: 0;
81 pre {
82 padding: 0;
83 margin: 0;
86 span#author {
87 color: #527bbd;
88 font-family: sans-serif;
89 font-weight: bold;
90 font-size: 1.1em;
92 span#email {
94 span#revnumber, span#revdate, span#revremark {
95 font-family: sans-serif;
98 div#footer {
99 font-family: sans-serif;
100 font-size: small;
101 border-top: 2px solid silver;
102 padding-top: 0.5em;
103 margin-top: 4.0em;
105 div#footer-text {
106 float: left;
107 padding-bottom: 0.5em;
109 div#footer-badges {
110 float: right;
111 padding-bottom: 0.5em;
114 div#preamble {
115 margin-top: 1.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 {
121 margin-top: 1.5em;
122 margin-bottom: 1.5em;
124 div.admonitionblock {
125 margin-top: 2.5em;
126 margin-bottom: 2.5em;
129 div.content { /* Block element content. */
130 padding: 0;
133 /* Block element titles. */
134 div.title, caption.title {
135 color: #527bbd;
136 font-family: sans-serif;
137 font-weight: bold;
138 text-align: left;
139 margin-top: 1.0em;
140 margin-bottom: 0.5em;
142 div.title + * {
143 margin-top: 0;
146 td div.title:first-child {
147 margin-top: 0.0em;
149 div.content div.title:first-child {
150 margin-top: 0.0em;
152 div.content + div.title {
153 margin-top: 0.0em;
156 div.sidebarblock > div.content {
157 background: #ffffee;
158 border: 1px solid silver;
159 padding: 0.5em;
162 div.listingblock > div.content {
163 border: 1px solid silver;
164 background: #f4f4f4;
165 padding: 0.5em;
168 div.quoteblock {
169 padding-left: 2.0em;
170 margin-right: 10%;
172 div.quoteblock > div.attribution {
173 padding-top: 0.5em;
174 text-align: right;
177 div.verseblock {
178 padding-left: 2.0em;
179 margin-right: 10%;
181 div.verseblock > div.content {
182 white-space: pre;
184 div.verseblock > div.attribution {
185 padding-top: 0.75em;
186 text-align: left;
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div.verseblock + div.attribution {
190 text-align: left;
193 div.admonitionblock .icon {
194 vertical-align: top;
195 font-size: 1.1em;
196 font-weight: bold;
197 text-decoration: underline;
198 color: #527bbd;
199 padding-right: 0.5em;
201 div.admonitionblock td.content {
202 padding-left: 0.5em;
203 border-left: 2px solid silver;
206 div.exampleblock > div.content {
207 border-left: 2px solid silver;
208 padding: 0.5em;
211 div.imageblock div.content { padding-left: 0; }
212 span.image img { border-style: none; }
213 a.image:visited { color: white; }
215 dl {
216 margin-top: 0.8em;
217 margin-bottom: 0.8em;
219 dt {
220 margin-top: 0.5em;
221 margin-bottom: 0;
222 font-style: normal;
223 color: navy;
225 dd > *:first-child {
226 margin-top: 0.1em;
229 ul, ol {
230 list-style-position: outside;
232 ol.arabic {
233 list-style-type: decimal;
235 ol.loweralpha {
236 list-style-type: lower-alpha;
238 ol.upperalpha {
239 list-style-type: upper-alpha;
241 ol.lowerroman {
242 list-style-type: lower-roman;
244 ol.upperroman {
245 list-style-type: upper-roman;
248 div.compact ul, div.compact ol,
249 div.compact p, div.compact p,
250 div.compact div, div.compact div {
251 margin-top: 0.1em;
252 margin-bottom: 0.1em;
255 div.tableblock > table {
256 border: 3px solid #527bbd;
258 thead {
259 font-family: sans-serif;
260 font-weight: bold;
262 tfoot {
263 font-weight: bold;
265 td > div.verse {
266 white-space: pre;
268 p.table {
269 margin-top: 0;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div.tableblock > table[frame="void"] {
273 border-style: none;
275 div.tableblock > table[frame="hsides"] {
276 border-left-style: none;
277 border-right-style: none;
279 div.tableblock > table[frame="vsides"] {
280 border-top-style: none;
281 border-bottom-style: none;
285 div.hdlist {
286 margin-top: 0.8em;
287 margin-bottom: 0.8em;
289 div.hdlist tr {
290 padding-bottom: 15px;
292 dt.hdlist1.strong, td.hdlist1.strong {
293 font-weight: bold;
295 td.hdlist1 {
296 vertical-align: top;
297 font-style: normal;
298 padding-right: 0.8em;
299 color: navy;
301 td.hdlist2 {
302 vertical-align: top;
304 div.hdlist.compact tr {
305 margin: 0;
306 padding-bottom: 0;
309 .comment {
310 background: yellow;
313 @media print {
314 div#footer-badges { display: none; }
317 div#toctitle {
318 color: #527bbd;
319 font-family: sans-serif;
320 font-size: 1.1em;
321 font-weight: bold;
322 margin-top: 1.0em;
323 margin-bottom: 0.1em;
326 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
327 margin-top: 0;
328 margin-bottom: 0;
330 div.toclevel2 {
331 margin-left: 2em;
332 font-size: 0.9em;
334 div.toclevel3 {
335 margin-left: 4em;
336 font-size: 0.9em;
338 div.toclevel4 {
339 margin-left: 6em;
340 font-size: 0.9em;
342 /* Overrides for manpage documents */
343 h1 {
344 padding-top: 0.5em;
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver;
347 border-bottom: 2px solid silver;
349 h2 {
350 border-style: none;
352 div.sectionbody {
353 margin-left: 5%;
356 @media print {
357 div#toc { display: none; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div.sidebar-content {
363 background: #ffffee;
364 border: 1px solid silver;
365 padding: 0.5em;
367 div.sidebar-title, div.image-title {
368 color: #527bbd;
369 font-family: sans-serif;
370 font-weight: bold;
371 margin-top: 0.0em;
372 margin-bottom: 0.5em;
375 div.listingblock div.content {
376 border: 1px solid silver;
377 background: #f4f4f4;
378 padding: 0.5em;
381 div.quoteblock-attribution {
382 padding-top: 0.5em;
383 text-align: right;
386 div.verseblock-content {
387 white-space: pre;
389 div.verseblock-attribution {
390 padding-top: 0.75em;
391 text-align: left;
394 div.exampleblock-content {
395 border-left: 2px solid silver;
396 padding-left: 0.5em;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc a:visited { color: blue; }
401 </style>
402 </head>
403 <body>
404 <div id="header">
405 <h1>
406 git-log(1) Manual Page
407 </h1>
408 <h2>NAME</h2>
409 <div class="sectionbody">
410 <p>git-log -
411 Show commit logs
412 </p>
413 </div>
414 </div>
415 <h2 id="_synopsis">SYNOPSIS</h2>
416 <div class="sectionbody">
417 <div class="paragraph"><p><em>git log</em> [&lt;options&gt;] [&lt;since&gt;..&lt;until&gt;] [[--] &lt;path&gt;&#8230;]</p></div>
418 </div>
419 <h2 id="_description">DESCRIPTION</h2>
420 <div class="sectionbody">
421 <div class="paragraph"><p>Shows the commit logs.</p></div>
422 <div class="paragraph"><p>The command takes options applicable to the <em>git rev-list</em>
423 command to control what is shown and how, and options applicable to
424 the <em>git diff-*</em> commands to control how the changes
425 each commit introduces are shown.</p></div>
426 </div>
427 <h2 id="_options">OPTIONS</h2>
428 <div class="sectionbody">
429 <div class="dlist"><dl>
430 <dt class="hdlist1">
431 -&lt;n&gt;
432 </dt>
433 <dd>
435 Limits the number of commits to show.
436 </p>
437 </dd>
438 <dt class="hdlist1">
439 &lt;since&gt;..&lt;until&gt;
440 </dt>
441 <dd>
443 Show only commits between the named two commits. When
444 either &lt;since&gt; or &lt;until&gt; is omitted, it defaults to
445 <tt>HEAD</tt>, i.e. the tip of the current branch.
446 For a more complete list of ways to spell &lt;since&gt;
447 and &lt;until&gt;, see <a href="gitrevisions.html">gitrevisions(7)</a>.
448 </p>
449 </dd>
450 <dt class="hdlist1">
451 --follow
452 </dt>
453 <dd>
455 Continue listing the history of a file beyond renames
456 (works only for a single file).
457 </p>
458 </dd>
459 <dt class="hdlist1">
460 --no-decorate
461 </dt>
462 <dt class="hdlist1">
463 --decorate[=short|full|no]
464 </dt>
465 <dd>
467 Print out the ref names of any commits that are shown. If <em>short</em> is
468 specified, the ref name prefixes <em>refs/heads/</em>, <em>refs/tags/</em> and
469 <em>refs/remotes/</em> will not be printed. If <em>full</em> is specified, the
470 full ref name (including prefix) will be printed. The default option
471 is <em>short</em>.
472 </p>
473 </dd>
474 <dt class="hdlist1">
475 --source
476 </dt>
477 <dd>
479 Print out the ref name given on the command line by which each
480 commit was reached.
481 </p>
482 </dd>
483 <dt class="hdlist1">
484 --full-diff
485 </dt>
486 <dd>
488 Without this flag, "git log -p &lt;path&gt;&#8230;" shows commits that
489 touch the specified paths, and diffs about the same specified
490 paths. With this, the full diff is shown for commits that touch
491 the specified paths; this means that "&lt;path&gt;&#8230;" limits only
492 commits, and doesn&#8217;t limit diff for those commits.
493 </p>
494 <div class="paragraph"><p>Note that this affects all diff-based output types, e.g. those
495 produced by --stat etc.</p></div>
496 </dd>
497 <dt class="hdlist1">
498 --log-size
499 </dt>
500 <dd>
502 Before the log message print out its size in bytes. Intended
503 mainly for porcelain tools consumption. If git is unable to
504 produce a valid value size is set to zero.
505 Note that only message is considered, if also a diff is shown
506 its size is not included.
507 </p>
508 </dd>
509 <dt class="hdlist1">
510 [--] &lt;path&gt;&#8230;
511 </dt>
512 <dd>
514 Show only commits that affect any of the specified paths. To
515 prevent confusion with options and branch names, paths may need
516 to be prefixed with "-- " to separate them from options or
517 refnames.
518 </p>
519 </dd>
520 </dl></div>
521 <h3 id="_common_diff_options">Common diff options</h3><div style="clear:left"></div>
522 <div class="dlist"><dl>
523 <dt class="hdlist1">
525 </dt>
526 <dt class="hdlist1">
528 </dt>
529 <dt class="hdlist1">
530 --patch
531 </dt>
532 <dd>
534 Generate patch (see section on generating patches).
536 </p>
537 </dd>
538 <dt class="hdlist1">
539 -U&lt;n&gt;
540 </dt>
541 <dt class="hdlist1">
542 --unified=&lt;n&gt;
543 </dt>
544 <dd>
546 Generate diffs with &lt;n&gt; lines of context instead of
547 the usual three.
548 Implies <tt>-p</tt>.
549 </p>
550 </dd>
551 <dt class="hdlist1">
552 --raw
553 </dt>
554 <dd>
556 Generate the raw format.
558 </p>
559 </dd>
560 <dt class="hdlist1">
561 --patch-with-raw
562 </dt>
563 <dd>
565 Synonym for <tt>-p --raw</tt>.
566 </p>
567 </dd>
568 <dt class="hdlist1">
569 --patience
570 </dt>
571 <dd>
573 Generate a diff using the "patience diff" algorithm.
574 </p>
575 </dd>
576 <dt class="hdlist1">
577 --stat[=&lt;width&gt;[,&lt;name-width&gt;]]
578 </dt>
579 <dd>
581 Generate a diffstat. You can override the default
582 output width for 80-column terminal by <tt>--stat=&lt;width&gt;</tt>.
583 The width of the filename part can be controlled by
584 giving another width to it separated by a comma.
585 </p>
586 </dd>
587 <dt class="hdlist1">
588 --numstat
589 </dt>
590 <dd>
592 Similar to <tt>--stat</tt>, but shows number of added and
593 deleted lines in decimal notation and pathname without
594 abbreviation, to make it more machine friendly. For
595 binary files, outputs two <tt>-</tt> instead of saying
596 <tt>0 0</tt>.
597 </p>
598 </dd>
599 <dt class="hdlist1">
600 --shortstat
601 </dt>
602 <dd>
604 Output only the last line of the <tt>--stat</tt> format containing total
605 number of modified files, as well as number of added and deleted
606 lines.
607 </p>
608 </dd>
609 <dt class="hdlist1">
610 --dirstat[=&lt;limit&gt;]
611 </dt>
612 <dd>
614 Output the distribution of relative amount of changes (number of lines added or
615 removed) for each sub-directory. Directories with changes below
616 a cut-off percent (3% by default) are not shown. The cut-off percent
617 can be set with <tt>--dirstat=&lt;limit&gt;</tt>. Changes in a child directory are not
618 counted for the parent directory, unless <tt>--cumulative</tt> is used.
619 </p>
620 </dd>
621 <dt class="hdlist1">
622 --dirstat-by-file[=&lt;limit&gt;]
623 </dt>
624 <dd>
626 Same as <tt>--dirstat</tt>, but counts changed files instead of lines.
627 </p>
628 </dd>
629 <dt class="hdlist1">
630 --summary
631 </dt>
632 <dd>
634 Output a condensed summary of extended header information
635 such as creations, renames and mode changes.
636 </p>
637 </dd>
638 <dt class="hdlist1">
639 --patch-with-stat
640 </dt>
641 <dd>
643 Synonym for <tt>-p --stat</tt>.
644 </p>
645 </dd>
646 <dt class="hdlist1">
648 </dt>
649 <dd>
651 Separate the commits with NULs instead of with new newlines.
652 </p>
653 <div class="paragraph"><p>Also, when <tt>--raw</tt> or <tt>--numstat</tt> has been given, do not munge
654 pathnames and use NULs as output field terminators.</p></div>
655 <div class="paragraph"><p>Without this option, each pathname output will have TAB, LF, double quotes,
656 and backslash characters replaced with <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt>, and <tt>\\</tt>,
657 respectively, and the pathname will be enclosed in double quotes if
658 any of those replacements occurred.</p></div>
659 </dd>
660 <dt class="hdlist1">
661 --name-only
662 </dt>
663 <dd>
665 Show only names of changed files.
666 </p>
667 </dd>
668 <dt class="hdlist1">
669 --name-status
670 </dt>
671 <dd>
673 Show only names and status of changed files. See the description
674 of the <tt>--diff-filter</tt> option on what the status letters mean.
675 </p>
676 </dd>
677 <dt class="hdlist1">
678 --submodule[=&lt;format&gt;]
679 </dt>
680 <dd>
682 Chose the output format for submodule differences. &lt;format&gt; can be one of
683 <em>short</em> and <em>log</em>. <em>short</em> just shows pairs of commit names, this format
684 is used when this option is not given. <em>log</em> is the default value for this
685 option and lists the commits in that commit range like the <em>summary</em>
686 option of <a href="git-submodule.html">git-submodule(1)</a> does.
687 </p>
688 </dd>
689 <dt class="hdlist1">
690 --color[=&lt;when&gt;]
691 </dt>
692 <dd>
694 Show colored diff.
695 The value must be always (the default), never, or auto.
696 </p>
697 </dd>
698 <dt class="hdlist1">
699 --no-color
700 </dt>
701 <dd>
703 Turn off colored diff, even when the configuration file
704 gives the default to color output.
705 Same as <tt>--color=never</tt>.
706 </p>
707 </dd>
708 <dt class="hdlist1">
709 --word-diff[=&lt;mode&gt;]
710 </dt>
711 <dd>
713 Show a word diff, using the &lt;mode&gt; to delimit changed words.
714 By default, words are delimited by whitespace; see
715 <tt>--word-diff-regex</tt> below. The &lt;mode&gt; defaults to <em>plain</em>, and
716 must be one of:
717 </p>
718 <div class="dlist"><dl>
719 <dt class="hdlist1">
720 color
721 </dt>
722 <dd>
724 Highlight changed words using only colors. Implies <tt>--color</tt>.
725 </p>
726 </dd>
727 <dt class="hdlist1">
728 plain
729 </dt>
730 <dd>
732 Show words as <tt>[-removed-]</tt> and <tt>{<tt>added</tt>}</tt>. Makes no
733 attempts to escape the delimiters if they appear in the input,
734 so the output may be ambiguous.
735 </p>
736 </dd>
737 <dt class="hdlist1">
738 porcelain
739 </dt>
740 <dd>
742 Use a special line-based format intended for script
743 consumption. Added/removed/unchanged runs are printed in the
744 usual unified diff format, starting with a <tt>+</tt>/<tt>-</tt>/` `
745 character at the beginning of the line and extending to the
746 end of the line. Newlines in the input are represented by a
747 tilde <tt>~</tt> on a line of its own.
748 </p>
749 </dd>
750 <dt class="hdlist1">
751 none
752 </dt>
753 <dd>
755 Disable word diff again.
756 </p>
757 </dd>
758 </dl></div>
759 <div class="paragraph"><p>Note that despite the name of the first mode, color is used to
760 highlight the changed parts in all modes if enabled.</p></div>
761 </dd>
762 <dt class="hdlist1">
763 --word-diff-regex=&lt;regex&gt;
764 </dt>
765 <dd>
767 Use &lt;regex&gt; to decide what a word is, instead of considering
768 runs of non-whitespace to be a word. Also implies
769 <tt>--word-diff</tt> unless it was already enabled.
770 </p>
771 <div class="paragraph"><p>Every non-overlapping match of the
772 &lt;regex&gt; is considered a word. Anything between these matches is
773 considered whitespace and ignored(!) for the purposes of finding
774 differences. You may want to append <tt>|[^[:space:]]</tt> to your regular
775 expression to make sure that it matches all non-whitespace characters.
776 A match that contains a newline is silently truncated(!) at the
777 newline.</p></div>
778 <div class="paragraph"><p>The regex can also be set via a diff driver or configuration option, see
779 <a href="gitattributes.html">gitattributes(1)</a> or <a href="git-config.html">git-config(1)</a>. Giving it explicitly
780 overrides any diff driver or configuration setting. Diff drivers
781 override configuration settings.</p></div>
782 </dd>
783 <dt class="hdlist1">
784 --color-words[=&lt;regex&gt;]
785 </dt>
786 <dd>
788 Equivalent to <tt>--word-diff=color</tt> plus (if a regex was
789 specified) <tt>--word-diff-regex=&lt;regex&gt;</tt>.
790 </p>
791 </dd>
792 <dt class="hdlist1">
793 --no-renames
794 </dt>
795 <dd>
797 Turn off rename detection, even when the configuration
798 file gives the default to do so.
799 </p>
800 </dd>
801 <dt class="hdlist1">
802 --check
803 </dt>
804 <dd>
806 Warn if changes introduce trailing whitespace
807 or an indent that uses a space before a tab. Exits with
808 non-zero status if problems are found. Not compatible with
809 --exit-code.
810 </p>
811 </dd>
812 <dt class="hdlist1">
813 --full-index
814 </dt>
815 <dd>
817 Instead of the first handful of characters, show the full
818 pre- and post-image blob object names on the "index"
819 line when generating patch format output.
820 </p>
821 </dd>
822 <dt class="hdlist1">
823 --binary
824 </dt>
825 <dd>
827 In addition to <tt>--full-index</tt>, output a binary diff that
828 can be applied with <tt>git-apply</tt>.
829 </p>
830 </dd>
831 <dt class="hdlist1">
832 --abbrev[=&lt;n&gt;]
833 </dt>
834 <dd>
836 Instead of showing the full 40-byte hexadecimal object
837 name in diff-raw format output and diff-tree header
838 lines, show only a partial prefix. This is
839 independent of the <tt>--full-index</tt> option above, which controls
840 the diff-patch output format. Non default number of
841 digits can be specified with <tt>--abbrev=&lt;n&gt;</tt>.
842 </p>
843 </dd>
844 <dt class="hdlist1">
845 -B[&lt;n&gt;][/&lt;m&gt;]
846 </dt>
847 <dt class="hdlist1">
848 --break-rewrites[=[&lt;n&gt;][/&lt;m&gt;]]
849 </dt>
850 <dd>
852 Break complete rewrite changes into pairs of delete and
853 create. This serves two purposes:
854 </p>
855 <div class="paragraph"><p>It affects the way a change that amounts to a total rewrite of a file
856 not as a series of deletion and insertion mixed together with a very
857 few lines that happen to match textually as the context, but as a
858 single deletion of everything old followed by a single insertion of
859 everything new, and the number <tt>m</tt> controls this aspect of the -B
860 option (defaults to 60%). <tt>-B/70%</tt> specifies that less than 30% of the
861 original should remain in the result for git to consider it a total
862 rewrite (i.e. otherwise the resulting patch will be a series of
863 deletion and insertion mixed together with context lines).</p></div>
864 <div class="paragraph"><p>When used with -M, a totally-rewritten file is also considered as the
865 source of a rename (usually -M only considers a file that disappeared
866 as the source of a rename), and the number <tt>n</tt> controls this aspect of
867 the -B option (defaults to 50%). <tt>-B20%</tt> specifies that a change with
868 addition and deletion compared to 20% or more of the file&#8217;s size are
869 eligible for being picked up as a possible source of a rename to
870 another file.</p></div>
871 </dd>
872 <dt class="hdlist1">
873 -M[&lt;n&gt;]
874 </dt>
875 <dt class="hdlist1">
876 --find-renames[=&lt;n&gt;]
877 </dt>
878 <dd>
880 If generating diffs, detect and report renames for each commit.
881 For following files across renames while traversing history, see
882 <tt>--follow</tt>.
883 If <tt>n</tt> is specified, it is a is a threshold on the similarity
884 index (i.e. amount of addition/deletions compared to the
885 file&#8217;s size). For example, <tt>-M90%</tt> means git should consider a
886 delete/add pair to be a rename if more than 90% of the file
887 hasn&#8217;t changed.
888 </p>
889 </dd>
890 <dt class="hdlist1">
891 -C[&lt;n&gt;]
892 </dt>
893 <dt class="hdlist1">
894 --find-copies[=&lt;n&gt;]
895 </dt>
896 <dd>
898 Detect copies as well as renames. See also <tt>--find-copies-harder</tt>.
899 If <tt>n</tt> is specified, it has the same meaning as for <tt>-M&lt;n&gt;</tt>.
900 </p>
901 </dd>
902 <dt class="hdlist1">
903 --find-copies-harder
904 </dt>
905 <dd>
907 For performance reasons, by default, <tt>-C</tt> option finds copies only
908 if the original file of the copy was modified in the same
909 changeset. This flag makes the command
910 inspect unmodified files as candidates for the source of
911 copy. This is a very expensive operation for large
912 projects, so use it with caution. Giving more than one
913 <tt>-C</tt> option has the same effect.
914 </p>
915 </dd>
916 <dt class="hdlist1">
917 -l&lt;num&gt;
918 </dt>
919 <dd>
921 The <tt>-M</tt> and <tt>-C</tt> options require O(n^2) processing time where n
922 is the number of potential rename/copy targets. This
923 option prevents rename/copy detection from running if
924 the number of rename/copy targets exceeds the specified
925 number.
926 </p>
927 </dd>
928 <dt class="hdlist1">
929 --diff-filter=[(A|C|D|M|R|T|U|X|B)&#8230;[*]]
930 </dt>
931 <dd>
933 Select only files that are Added (<tt>A</tt>), Copied (<tt>C</tt>),
934 Deleted (<tt>D</tt>), Modified (<tt>M</tt>), Renamed (<tt>R</tt>), have their
935 type (i.e. regular file, symlink, submodule, &#8230;) changed (<tt>T</tt>),
936 are Unmerged (<tt>U</tt>), are
937 Unknown (<tt>X</tt>), or have had their pairing Broken (<tt>B</tt>).
938 Any combination of the filter characters (including none) can be used.
939 When <tt>*</tt> (All-or-none) is added to the combination, all
940 paths are selected if there is any file that matches
941 other criteria in the comparison; if there is no file
942 that matches other criteria, nothing is selected.
943 </p>
944 </dd>
945 <dt class="hdlist1">
946 -S&lt;string&gt;
947 </dt>
948 <dd>
950 Look for differences that introduce or remove an instance of
951 &lt;string&gt;. Note that this is different than the string simply
952 appearing in diff output; see the <em>pickaxe</em> entry in
953 <a href="gitdiffcore.html">gitdiffcore(7)</a> for more details.
954 </p>
955 </dd>
956 <dt class="hdlist1">
957 -G&lt;regex&gt;
958 </dt>
959 <dd>
961 Look for differences whose added or removed line matches
962 the given &lt;regex&gt;.
963 </p>
964 </dd>
965 <dt class="hdlist1">
966 --pickaxe-all
967 </dt>
968 <dd>
970 When <tt>-S</tt> or <tt>-G</tt> finds a change, show all the changes in that
971 changeset, not just the files that contain the change
972 in &lt;string&gt;.
973 </p>
974 </dd>
975 <dt class="hdlist1">
976 --pickaxe-regex
977 </dt>
978 <dd>
980 Make the &lt;string&gt; not a plain string but an extended POSIX
981 regex to match.
982 </p>
983 </dd>
984 <dt class="hdlist1">
985 -O&lt;orderfile&gt;
986 </dt>
987 <dd>
989 Output the patch in the order specified in the
990 &lt;orderfile&gt;, which has one shell glob pattern per line.
991 </p>
992 </dd>
993 <dt class="hdlist1">
995 </dt>
996 <dd>
998 Swap two inputs; that is, show differences from index or
999 on-disk file to tree contents.
1000 </p>
1001 </dd>
1002 <dt class="hdlist1">
1003 --relative[=&lt;path&gt;]
1004 </dt>
1005 <dd>
1007 When run from a subdirectory of the project, it can be
1008 told to exclude changes outside the directory and show
1009 pathnames relative to it with this option. When you are
1010 not in a subdirectory (e.g. in a bare repository), you
1011 can name which subdirectory to make the output relative
1012 to by giving a &lt;path&gt; as an argument.
1013 </p>
1014 </dd>
1015 <dt class="hdlist1">
1017 </dt>
1018 <dt class="hdlist1">
1019 --text
1020 </dt>
1021 <dd>
1023 Treat all files as text.
1024 </p>
1025 </dd>
1026 <dt class="hdlist1">
1027 --ignore-space-at-eol
1028 </dt>
1029 <dd>
1031 Ignore changes in whitespace at EOL.
1032 </p>
1033 </dd>
1034 <dt class="hdlist1">
1036 </dt>
1037 <dt class="hdlist1">
1038 --ignore-space-change
1039 </dt>
1040 <dd>
1042 Ignore changes in amount of whitespace. This ignores whitespace
1043 at line end, and considers all other sequences of one or
1044 more whitespace characters to be equivalent.
1045 </p>
1046 </dd>
1047 <dt class="hdlist1">
1049 </dt>
1050 <dt class="hdlist1">
1051 --ignore-all-space
1052 </dt>
1053 <dd>
1055 Ignore whitespace when comparing lines. This ignores
1056 differences even if one line has whitespace where the other
1057 line has none.
1058 </p>
1059 </dd>
1060 <dt class="hdlist1">
1061 --inter-hunk-context=&lt;lines&gt;
1062 </dt>
1063 <dd>
1065 Show the context between diff hunks, up to the specified number
1066 of lines, thereby fusing hunks that are close to each other.
1067 </p>
1068 </dd>
1069 <dt class="hdlist1">
1070 --exit-code
1071 </dt>
1072 <dd>
1074 Make the program exit with codes similar to diff(1).
1075 That is, it exits with 1 if there were differences and
1076 0 means no differences.
1077 </p>
1078 </dd>
1079 <dt class="hdlist1">
1080 --quiet
1081 </dt>
1082 <dd>
1084 Disable all output of the program. Implies <tt>--exit-code</tt>.
1085 </p>
1086 </dd>
1087 <dt class="hdlist1">
1088 --ext-diff
1089 </dt>
1090 <dd>
1092 Allow an external diff helper to be executed. If you set an
1093 external diff driver with <a href="gitattributes.html">gitattributes(5)</a>, you need
1094 to use this option with <a href="git-log.html">git-log(1)</a> and friends.
1095 </p>
1096 </dd>
1097 <dt class="hdlist1">
1098 --no-ext-diff
1099 </dt>
1100 <dd>
1102 Disallow external diff drivers.
1103 </p>
1104 </dd>
1105 <dt class="hdlist1">
1106 --ignore-submodules[=&lt;when&gt;]
1107 </dt>
1108 <dd>
1110 Ignore changes to submodules in the diff generation. &lt;when&gt; can be
1111 either "none", "untracked", "dirty" or "all", which is the default
1112 Using "none" will consider the submodule modified when it either contains
1113 untracked or modified files or its HEAD differs from the commit recorded
1114 in the superproject and can be used to override any settings of the
1115 <em>ignore</em> option in <a href="git-config.html">git-config(1)</a> or <a href="gitmodules.html">gitmodules(5)</a>. When
1116 "untracked" is used submodules are not considered dirty when they only
1117 contain untracked content (but they are still scanned for modified
1118 content). Using "dirty" ignores all changes to the work tree of submodules,
1119 only changes to the commits stored in the superproject are shown (this was
1120 the behavior until 1.7.0). Using "all" hides all changes to submodules.
1121 </p>
1122 </dd>
1123 <dt class="hdlist1">
1124 --src-prefix=&lt;prefix&gt;
1125 </dt>
1126 <dd>
1128 Show the given source prefix instead of "a/".
1129 </p>
1130 </dd>
1131 <dt class="hdlist1">
1132 --dst-prefix=&lt;prefix&gt;
1133 </dt>
1134 <dd>
1136 Show the given destination prefix instead of "b/".
1137 </p>
1138 </dd>
1139 <dt class="hdlist1">
1140 --no-prefix
1141 </dt>
1142 <dd>
1144 Do not show any source or destination prefix.
1145 </p>
1146 </dd>
1147 </dl></div>
1148 <div class="paragraph"><p>For more detailed explanation on these common options, see also
1149 <a href="gitdiffcore.html">gitdiffcore(7)</a>.</p></div>
1150 <h3 id="_commit_formatting">Commit Formatting</h3><div style="clear:left"></div>
1151 <div class="dlist"><dl>
1152 <dt class="hdlist1">
1153 --pretty[=&lt;format&gt;]
1154 </dt>
1155 <dt class="hdlist1">
1156 --format=&lt;format&gt;
1157 </dt>
1158 <dd>
1160 Pretty-print the contents of the commit logs in a given format,
1161 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
1162 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>. See
1163 the "PRETTY FORMATS" section for some additional details for each
1164 format. When omitted, the format defaults to <em>medium</em>.
1165 </p>
1166 <div class="paragraph"><p>Note: you can specify the default pretty format in the repository
1167 configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
1168 </dd>
1169 <dt class="hdlist1">
1170 --abbrev-commit
1171 </dt>
1172 <dd>
1174 Instead of showing the full 40-byte hexadecimal commit object
1175 name, show only a partial prefix. Non default number of
1176 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
1177 diff output, if it is displayed).
1178 </p>
1179 <div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
1180 people using 80-column terminals.</p></div>
1181 </dd>
1182 <dt class="hdlist1">
1183 --oneline
1184 </dt>
1185 <dd>
1187 This is a shorthand for "--pretty=oneline --abbrev-commit"
1188 used together.
1189 </p>
1190 </dd>
1191 <dt class="hdlist1">
1192 --encoding[=&lt;encoding&gt;]
1193 </dt>
1194 <dd>
1196 The commit objects record the encoding used for the log message
1197 in their encoding header; this option can be used to tell the
1198 command to re-code the commit log message in the encoding
1199 preferred by the user. For non plumbing commands this
1200 defaults to UTF-8.
1201 </p>
1202 </dd>
1203 <dt class="hdlist1">
1204 --no-notes
1205 </dt>
1206 <dt class="hdlist1">
1207 --show-notes[=&lt;ref&gt;]
1208 </dt>
1209 <dd>
1211 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
1212 commit, when showing the commit log message. This is the default
1213 for <tt>git log</tt>, <tt>git show</tt> and <tt>git whatchanged</tt> commands when
1214 there is no <tt>--pretty</tt>, <tt>--format</tt> nor <tt>--oneline</tt> option is
1215 given on the command line.
1216 </p>
1217 <div class="paragraph"><p>With an optional argument, add this ref to the list of notes. The ref
1218 is taken to be in <tt>refs/notes/</tt> if it is not qualified.</p></div>
1219 </dd>
1220 <dt class="hdlist1">
1221 --[no-]standard-notes
1222 </dt>
1223 <dd>
1225 Enable or disable populating the notes ref list from the
1226 <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or
1227 corresponding environment overrides). Enabled by default.
1228 See <a href="git-config.html">git-config(1)</a>.
1229 </p>
1230 </dd>
1231 <dt class="hdlist1">
1232 --relative-date
1233 </dt>
1234 <dd>
1236 Synonym for <tt>--date=relative</tt>.
1237 </p>
1238 </dd>
1239 <dt class="hdlist1">
1240 --date=(relative|local|default|iso|rfc|short|raw)
1241 </dt>
1242 <dd>
1244 Only takes effect for dates shown in human-readable format, such
1245 as when using "--pretty". <tt>log.date</tt> config variable sets a default
1246 value for log command&#8217;s --date option.
1247 </p>
1248 <div class="paragraph"><p><tt>--date=relative</tt> shows dates relative to the current time,
1249 e.g. "2 hours ago".</p></div>
1250 <div class="paragraph"><p><tt>--date=local</tt> shows timestamps in user&#8217;s local timezone.</p></div>
1251 <div class="paragraph"><p><tt>--date=iso</tt> (or <tt>--date=iso8601</tt>) shows timestamps in ISO 8601 format.</p></div>
1252 <div class="paragraph"><p><tt>--date=rfc</tt> (or <tt>--date=rfc2822</tt>) shows timestamps in RFC 2822
1253 format, often found in E-mail messages.</p></div>
1254 <div class="paragraph"><p><tt>--date=short</tt> shows only date but not time, in <tt>YYYY-MM-DD</tt> format.</p></div>
1255 <div class="paragraph"><p><tt>--date=raw</tt> shows the date in the internal raw git format <tt>%s %z</tt> format.</p></div>
1256 <div class="paragraph"><p><tt>--date=default</tt> shows timestamps in the original timezone
1257 (either committer&#8217;s or author&#8217;s).</p></div>
1258 </dd>
1259 <dt class="hdlist1">
1260 --parents
1261 </dt>
1262 <dd>
1264 Print also the parents of the commit (in the form "commit parent&#8230;").
1265 Also enables parent rewriting, see <em>History Simplification</em> below.
1266 </p>
1267 </dd>
1268 <dt class="hdlist1">
1269 --children
1270 </dt>
1271 <dd>
1273 Print also the children of the commit (in the form "commit child&#8230;").
1274 Also enables parent rewriting, see <em>History Simplification</em> below.
1275 </p>
1276 </dd>
1277 <dt class="hdlist1">
1278 --left-right
1279 </dt>
1280 <dd>
1282 Mark which side of a symmetric diff a commit is reachable from.
1283 Commits from the left side are prefixed with <tt>&lt;</tt> and those from
1284 the right with <tt>&gt;</tt>. If combined with <tt>--boundary</tt>, those
1285 commits are prefixed with <tt>-</tt>.
1286 </p>
1287 <div class="paragraph"><p>For example, if you have this topology:</p></div>
1288 <div class="listingblock">
1289 <div class="content">
1290 <pre><tt> y---b---b branch B
1291 / \ /
1293 / / \
1294 o---x---a---a branch A</tt></pre>
1295 </div></div>
1296 <div class="paragraph"><p>you would get an output like this:</p></div>
1297 <div class="listingblock">
1298 <div class="content">
1299 <pre><tt> $ git rev-list --left-right --boundary --pretty=oneline A...B
1301 &gt;bbbbbbb... 3rd on b
1302 &gt;bbbbbbb... 2nd on b
1303 &lt;aaaaaaa... 3rd on a
1304 &lt;aaaaaaa... 2nd on a
1305 -yyyyyyy... 1st on b
1306 -xxxxxxx... 1st on a</tt></pre>
1307 </div></div>
1308 </dd>
1309 <dt class="hdlist1">
1310 --graph
1311 </dt>
1312 <dd>
1314 Draw a text-based graphical representation of the commit history
1315 on the left hand side of the output. This may cause extra lines
1316 to be printed in between commits, in order for the graph history
1317 to be drawn properly.
1318 </p>
1319 <div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> below.</p></div>
1320 <div class="paragraph"><p>This implies the <em>--topo-order</em> option by default, but the
1321 <em>--date-order</em> option may also be specified.</p></div>
1322 </dd>
1323 </dl></div>
1324 <h3 id="_diff_formatting">Diff Formatting</h3><div style="clear:left"></div>
1325 <div class="paragraph"><p>Below are listed options that control the formatting of diff output.
1326 Some of them are specific to <a href="git-rev-list.html">git-rev-list(1)</a>, however other diff
1327 options may be given. See <a href="git-diff-files.html">git-diff-files(1)</a> for more options.</p></div>
1328 <div class="dlist"><dl>
1329 <dt class="hdlist1">
1331 </dt>
1332 <dd>
1334 With this option, diff output for a merge commit
1335 shows the differences from each of the parents to the merge result
1336 simultaneously instead of showing pairwise diff between a parent
1337 and the result one at a time. Furthermore, it lists only files
1338 which were modified from all parents.
1339 </p>
1340 </dd>
1341 <dt class="hdlist1">
1342 --cc
1343 </dt>
1344 <dd>
1346 This flag implies the <em>-c</em> options and further compresses the
1347 patch output by omitting uninteresting hunks whose contents in
1348 the parents have only two variants and the merge result picks
1349 one of them without modification.
1350 </p>
1351 </dd>
1352 <dt class="hdlist1">
1354 </dt>
1355 <dd>
1357 This flag makes the merge commits show the full diff like
1358 regular commits; for each merge parent, a separate log entry
1359 and diff is generated. An exception is that only diff against
1360 the first parent is shown when <em>--first-parent</em> option is given;
1361 in that case, the output represents the changes the merge
1362 brought <em>into</em> the then-current branch.
1363 </p>
1364 </dd>
1365 <dt class="hdlist1">
1367 </dt>
1368 <dd>
1370 Show recursive diffs.
1371 </p>
1372 </dd>
1373 <dt class="hdlist1">
1375 </dt>
1376 <dd>
1378 Show the tree objects in the diff output. This implies <em>-r</em>.
1379 </p>
1380 </dd>
1381 <dt class="hdlist1">
1383 </dt>
1384 <dd>
1386 Suppress diff output.
1387 </p>
1388 </dd>
1389 </dl></div>
1390 <h3 id="_commit_limiting">Commit Limiting</h3><div style="clear:left"></div>
1391 <div class="paragraph"><p>Besides specifying a range of commits that should be listed using the
1392 special notations explained in the description, additional commit
1393 limiting may be applied.</p></div>
1394 <div class="dlist"><dl>
1395 <dt class="hdlist1">
1396 -n <em>number</em>
1397 </dt>
1398 <dt class="hdlist1">
1399 --max-count=&lt;number&gt;
1400 </dt>
1401 <dd>
1403 Limit the number of commits output.
1404 </p>
1405 </dd>
1406 <dt class="hdlist1">
1407 --skip=&lt;number&gt;
1408 </dt>
1409 <dd>
1411 Skip <em>number</em> commits before starting to show the commit output.
1412 </p>
1413 </dd>
1414 <dt class="hdlist1">
1415 --since=&lt;date&gt;
1416 </dt>
1417 <dt class="hdlist1">
1418 --after=&lt;date&gt;
1419 </dt>
1420 <dd>
1422 Show commits more recent than a specific date.
1423 </p>
1424 </dd>
1425 <dt class="hdlist1">
1426 --until=&lt;date&gt;
1427 </dt>
1428 <dt class="hdlist1">
1429 --before=&lt;date&gt;
1430 </dt>
1431 <dd>
1433 Show commits older than a specific date.
1434 </p>
1435 </dd>
1436 <dt class="hdlist1">
1437 --author=&lt;pattern&gt;
1438 </dt>
1439 <dt class="hdlist1">
1440 --committer=&lt;pattern&gt;
1441 </dt>
1442 <dd>
1444 Limit the commits output to ones with author/committer
1445 header lines that match the specified pattern (regular expression).
1446 </p>
1447 </dd>
1448 <dt class="hdlist1">
1449 --grep=&lt;pattern&gt;
1450 </dt>
1451 <dd>
1453 Limit the commits output to ones with log message that
1454 matches the specified pattern (regular expression).
1455 </p>
1456 </dd>
1457 <dt class="hdlist1">
1458 --all-match
1459 </dt>
1460 <dd>
1462 Limit the commits output to ones that match all given --grep,
1463 --author and --committer instead of ones that match at least one.
1464 </p>
1465 </dd>
1466 <dt class="hdlist1">
1468 </dt>
1469 <dt class="hdlist1">
1470 --regexp-ignore-case
1471 </dt>
1472 <dd>
1474 Match the regexp limiting patterns without regard to letters case.
1475 </p>
1476 </dd>
1477 <dt class="hdlist1">
1479 </dt>
1480 <dt class="hdlist1">
1481 --extended-regexp
1482 </dt>
1483 <dd>
1485 Consider the limiting patterns to be extended regular expressions
1486 instead of the default basic regular expressions.
1487 </p>
1488 </dd>
1489 <dt class="hdlist1">
1491 </dt>
1492 <dt class="hdlist1">
1493 --fixed-strings
1494 </dt>
1495 <dd>
1497 Consider the limiting patterns to be fixed strings (don&#8217;t interpret
1498 pattern as a regular expression).
1499 </p>
1500 </dd>
1501 <dt class="hdlist1">
1502 --remove-empty
1503 </dt>
1504 <dd>
1506 Stop when a given path disappears from the tree.
1507 </p>
1508 </dd>
1509 <dt class="hdlist1">
1510 --merges
1511 </dt>
1512 <dd>
1514 Print only merge commits.
1515 </p>
1516 </dd>
1517 <dt class="hdlist1">
1518 --no-merges
1519 </dt>
1520 <dd>
1522 Do not print commits with more than one parent.
1523 </p>
1524 </dd>
1525 <dt class="hdlist1">
1526 --first-parent
1527 </dt>
1528 <dd>
1530 Follow only the first parent commit upon seeing a merge
1531 commit. This option can give a better overview when
1532 viewing the evolution of a particular topic branch,
1533 because merges into a topic branch tend to be only about
1534 adjusting to updated upstream from time to time, and
1535 this option allows you to ignore the individual commits
1536 brought in to your history by such a merge.
1537 </p>
1538 </dd>
1539 <dt class="hdlist1">
1540 --not
1541 </dt>
1542 <dd>
1544 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
1545 for all following revision specifiers, up to the next <em>--not</em>.
1546 </p>
1547 </dd>
1548 <dt class="hdlist1">
1549 --all
1550 </dt>
1551 <dd>
1553 Pretend as if all the refs in <tt>refs/</tt> are listed on the
1554 command line as <em>&lt;commit&gt;</em>.
1555 </p>
1556 </dd>
1557 <dt class="hdlist1">
1558 --branches[=&lt;pattern&gt;]
1559 </dt>
1560 <dd>
1562 Pretend as if all the refs in <tt>refs/heads</tt> are listed
1563 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
1564 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
1565 <em><strong></em>, or <em>[</em>, <em>/</strong></em> at the end is implied.
1566 </p>
1567 </dd>
1568 <dt class="hdlist1">
1569 --tags[=&lt;pattern&gt;]
1570 </dt>
1571 <dd>
1573 Pretend as if all the refs in <tt>refs/tags</tt> are listed
1574 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
1575 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em><strong></em>,
1576 or <em>[</em>, <em>/</strong></em> at the end is implied.
1577 </p>
1578 </dd>
1579 <dt class="hdlist1">
1580 --remotes[=&lt;pattern&gt;]
1581 </dt>
1582 <dd>
1584 Pretend as if all the refs in <tt>refs/remotes</tt> are listed
1585 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
1586 remote-tracking branches to ones matching given shell glob.
1587 If pattern lacks <em>?</em>, <em><strong></em>, or <em>[</em>, <em>/</strong></em> at the end is implied.
1588 </p>
1589 </dd>
1590 <dt class="hdlist1">
1591 --glob=&lt;glob-pattern&gt;
1592 </dt>
1593 <dd>
1595 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
1596 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
1597 is automatically prepended if missing. If pattern lacks <em>?</em>, <em><strong></em>,
1598 or <em>[</em>, <em>/</strong></em> at the end is implied.
1599 </p>
1600 </dd>
1601 <dt class="hdlist1">
1602 --bisect
1603 </dt>
1604 <dd>
1606 Pretend as if the bad bisection ref <tt>refs/bisect/bad</tt>
1607 was listed and as if it was followed by <tt>--not</tt> and the good
1608 bisection refs <tt>refs/bisect/good-*</tt> on the command
1609 line.
1610 </p>
1611 </dd>
1612 <dt class="hdlist1">
1613 --stdin
1614 </dt>
1615 <dd>
1617 In addition to the <em>&lt;commit&gt;</em> listed on the command
1618 line, read them from the standard input. If a <em>--</em> separator is
1619 seen, stop reading commits and start reading paths to limit the
1620 result.
1621 </p>
1622 </dd>
1623 <dt class="hdlist1">
1624 --cherry-pick
1625 </dt>
1626 <dd>
1628 Omit any commit that introduces the same change as
1629 another commit on the "other side" when the set of
1630 commits are limited with symmetric difference.
1631 </p>
1632 <div class="paragraph"><p>For example, if you have two branches, <tt>A</tt> and <tt>B</tt>, a usual way
1633 to list all commits on only one side of them is with
1634 <tt>--left-right</tt>, like the example above in the description of
1635 that option. It however shows the commits that were cherry-picked
1636 from the other branch (for example, "3rd on b" may be cherry-picked
1637 from branch A). With this option, such pairs of commits are
1638 excluded from the output.</p></div>
1639 </dd>
1640 <dt class="hdlist1">
1642 </dt>
1643 <dt class="hdlist1">
1644 --walk-reflogs
1645 </dt>
1646 <dd>
1648 Instead of walking the commit ancestry chain, walk
1649 reflog entries from the most recent one to older ones.
1650 When this option is used you cannot specify commits to
1651 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
1652 nor <em>commit1...commit2</em> notations cannot be used).
1653 </p>
1654 <div class="paragraph"><p>With <em>--pretty</em> format other than oneline (for obvious reasons),
1655 this causes the output to have two extra lines of information
1656 taken from the reflog. By default, <em>commit@{Nth}</em> notation is
1657 used in the output. When the starting commit is specified as
1658 <em>commit@{now}</em>, output also uses <em>commit@{timestamp}</em> notation
1659 instead. Under <em>--pretty=oneline</em>, the commit message is
1660 prefixed with this information on the same line.
1661 This option cannot be combined with <em>--reverse</em>.
1662 See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
1663 </dd>
1664 <dt class="hdlist1">
1665 --merge
1666 </dt>
1667 <dd>
1669 After a failed merge, show refs that touch files having a
1670 conflict and don&#8217;t exist on all heads to merge.
1671 </p>
1672 </dd>
1673 <dt class="hdlist1">
1674 --boundary
1675 </dt>
1676 <dd>
1678 Output uninteresting commits at the boundary, which are usually
1679 not shown.
1680 </p>
1681 </dd>
1682 </dl></div>
1683 <h3 id="_history_simplification">History Simplification</h3><div style="clear:left"></div>
1684 <div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
1685 commits modifying a particular &lt;path&gt;. But there are two parts of
1686 <em>History Simplification</em>, one part is selecting the commits and the other
1687 is how to do it, as there are various strategies to simplify the history.</p></div>
1688 <div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1689 <div class="dlist"><dl>
1690 <dt class="hdlist1">
1691 &lt;paths&gt;
1692 </dt>
1693 <dd>
1695 Commits modifying the given &lt;paths&gt; are selected.
1696 </p>
1697 </dd>
1698 <dt class="hdlist1">
1699 --simplify-by-decoration
1700 </dt>
1701 <dd>
1703 Commits that are referred by some branch or tag are selected.
1704 </p>
1705 </dd>
1706 </dl></div>
1707 <div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1708 <div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1709 <div class="dlist"><dl>
1710 <dt class="hdlist1">
1711 Default mode
1712 </dt>
1713 <dd>
1715 Simplifies the history to the simplest history explaining the
1716 final state of the tree. Simplest because it prunes some side
1717 branches if the end result is the same (i.e. merging branches
1718 with the same content)
1719 </p>
1720 </dd>
1721 <dt class="hdlist1">
1722 --full-history
1723 </dt>
1724 <dd>
1726 As the default mode but does not prune some history.
1727 </p>
1728 </dd>
1729 <dt class="hdlist1">
1730 --dense
1731 </dt>
1732 <dd>
1734 Only the selected commits are shown, plus some to have a
1735 meaningful history.
1736 </p>
1737 </dd>
1738 <dt class="hdlist1">
1739 --sparse
1740 </dt>
1741 <dd>
1743 All commits in the simplified history are shown.
1744 </p>
1745 </dd>
1746 <dt class="hdlist1">
1747 --simplify-merges
1748 </dt>
1749 <dd>
1751 Additional option to <em>--full-history</em> to remove some needless
1752 merges from the resulting history, as there are no selected
1753 commits contributing to this merge.
1754 </p>
1755 </dd>
1756 <dt class="hdlist1">
1757 --ancestry-path
1758 </dt>
1759 <dd>
1761 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1762 or <em>commit2 &#94;commit1</em>), only display commits that exist
1763 directly on the ancestry chain between the <em>commit1</em> and
1764 <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
1765 and ancestors of <em>commit2</em>.
1766 </p>
1767 </dd>
1768 </dl></div>
1769 <div class="paragraph"><p>A more detailed explanation follows.</p></div>
1770 <div class="paragraph"><p>Suppose you specified <tt>foo</tt> as the &lt;paths&gt;. We shall call commits
1771 that modify <tt>foo</tt> !TREESAME, and the rest TREESAME. (In a diff
1772 filtered for <tt>foo</tt>, they look different and equal, respectively.)</p></div>
1773 <div class="paragraph"><p>In the following, we will always refer to the same example history to
1774 illustrate the differences between simplification settings. We assume
1775 that you are filtering for a file <tt>foo</tt> in this commit graph:</p></div>
1776 <div class="listingblock">
1777 <div class="content">
1778 <pre><tt> .-A---M---N---O---P
1779 / / / / /
1780 I B C D E
1781 \ / / / /
1782 `-------------'</tt></pre>
1783 </div></div>
1784 <div class="paragraph"><p>The horizontal line of history A&#8212;P is taken to be the first parent of
1785 each merge. The commits are:</p></div>
1786 <div class="ulist"><ul>
1787 <li>
1789 <tt>I</tt> is the initial commit, in which <tt>foo</tt> exists with contents
1790 "asdf", and a file <tt>quux</tt> exists with contents "quux". Initial
1791 commits are compared to an empty tree, so <tt>I</tt> is !TREESAME.
1792 </p>
1793 </li>
1794 <li>
1796 In <tt>A</tt>, <tt>foo</tt> contains just "foo".
1797 </p>
1798 </li>
1799 <li>
1801 <tt>B</tt> contains the same change as <tt>A</tt>. Its merge <tt>M</tt> is trivial and
1802 hence TREESAME to all parents.
1803 </p>
1804 </li>
1805 <li>
1807 <tt>C</tt> does not change <tt>foo</tt>, but its merge <tt>N</tt> changes it to "foobar",
1808 so it is not TREESAME to any parent.
1809 </p>
1810 </li>
1811 <li>
1813 <tt>D</tt> sets <tt>foo</tt> to "baz". Its merge <tt>O</tt> combines the strings from
1814 <tt>N</tt> and <tt>D</tt> to "foobarbaz"; i.e., it is not TREESAME to any parent.
1815 </p>
1816 </li>
1817 <li>
1819 <tt>E</tt> changes <tt>quux</tt> to "xyzzy", and its merge <tt>P</tt> combines the
1820 strings to "quux xyzzy". Despite appearing interesting, <tt>P</tt> is
1821 TREESAME to all parents.
1822 </p>
1823 </li>
1824 </ul></div>
1825 <div class="paragraph"><p><em>rev-list</em> walks backwards through history, including or excluding
1826 commits based on whether <em>--full-history</em> and/or parent rewriting
1827 (via <em>--parents</em> or <em>--children</em>) are used. The following settings
1828 are available.</p></div>
1829 <div class="dlist"><dl>
1830 <dt class="hdlist1">
1831 Default mode
1832 </dt>
1833 <dd>
1835 Commits are included if they are not TREESAME to any parent
1836 (though this can be changed, see <em>--sparse</em> below). If the
1837 commit was a merge, and it was TREESAME to one parent, follow
1838 only that parent. (Even if there are several TREESAME
1839 parents, follow only one of them.) Otherwise, follow all
1840 parents.
1841 </p>
1842 <div class="paragraph"><p>This results in:</p></div>
1843 <div class="listingblock">
1844 <div class="content">
1845 <pre><tt> .-A---N---O
1846 / / /
1847 I---------D</tt></pre>
1848 </div></div>
1849 <div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
1850 available, removed <tt>B</tt> from consideration entirely. <tt>C</tt> was
1851 considered via <tt>N</tt>, but is TREESAME. Root commits are compared to an
1852 empty tree, so <tt>I</tt> is !TREESAME.</p></div>
1853 <div class="paragraph"><p>Parent/child relations are only visible with --parents, but that does
1854 not affect the commits selected in default mode, so we have shown the
1855 parent lines.</p></div>
1856 </dd>
1857 <dt class="hdlist1">
1858 --full-history without parent rewriting
1859 </dt>
1860 <dd>
1862 This mode differs from the default in one point: always follow
1863 all parents of a merge, even if it is TREESAME to one of them.
1864 Even if more than one side of the merge has commits that are
1865 included, this does not imply that the merge itself is! In
1866 the example, we get
1867 </p>
1868 <div class="listingblock">
1869 <div class="content">
1870 <pre><tt> I A B N D O</tt></pre>
1871 </div></div>
1872 <div class="paragraph"><p><tt>P</tt> and <tt>M</tt> were excluded because they are TREESAME to a parent. <tt>E</tt>,
1873 <tt>C</tt> and <tt>B</tt> were all walked, but only <tt>B</tt> was !TREESAME, so the others
1874 do not appear.</p></div>
1875 <div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
1876 about the parent/child relationships between the commits, so we show
1877 them disconnected.</p></div>
1878 </dd>
1879 <dt class="hdlist1">
1880 --full-history with parent rewriting
1881 </dt>
1882 <dd>
1884 Ordinary commits are only included if they are !TREESAME
1885 (though this can be changed, see <em>--sparse</em> below).
1886 </p>
1887 <div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
1888 Along each parent, prune away commits that are not included
1889 themselves. This results in</p></div>
1890 <div class="listingblock">
1891 <div class="content">
1892 <pre><tt> .-A---M---N---O---P
1893 / / / / /
1894 I B / D /
1895 \ / / / /
1896 `-------------'</tt></pre>
1897 </div></div>
1898 <div class="paragraph"><p>Compare to <em>--full-history</em> without rewriting above. Note that <tt>E</tt>
1899 was pruned away because it is TREESAME, but the parent list of P was
1900 rewritten to contain <tt>E</tt>'s parent <tt>I</tt>. The same happened for <tt>C</tt> and
1901 <tt>N</tt>. Note also that <tt>P</tt> was included despite being TREESAME.</p></div>
1902 </dd>
1903 </dl></div>
1904 <div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
1905 affects inclusion:</p></div>
1906 <div class="dlist"><dl>
1907 <dt class="hdlist1">
1908 --dense
1909 </dt>
1910 <dd>
1912 Commits that are walked are included if they are not TREESAME
1913 to any parent.
1914 </p>
1915 </dd>
1916 <dt class="hdlist1">
1917 --sparse
1918 </dt>
1919 <dd>
1921 All commits that are walked are included.
1922 </p>
1923 <div class="paragraph"><p>Note that without <em>--full-history</em>, this still simplifies merges: if
1924 one of the parents is TREESAME, we follow only that one, so the other
1925 sides of the merge are never walked.</p></div>
1926 </dd>
1927 <dt class="hdlist1">
1928 --simplify-merges
1929 </dt>
1930 <dd>
1932 First, build a history graph in the same way that
1933 <em>--full-history</em> with parent rewriting does (see above).
1934 </p>
1935 <div class="paragraph"><p>Then simplify each commit &#8216;C` to its replacement <tt>C&#8217;</tt> in the final
1936 history according to the following rules:</p></div>
1937 <div class="ulist"><ul>
1938 <li>
1940 Set &#8216;C&#8217;` to <tt>C</tt>.
1941 </p>
1942 </li>
1943 <li>
1945 Replace each parent &#8216;P` of <tt>C&#8217;</tt> with its simplification &#8216;P&#8217;`. In
1946 the process, drop parents that are ancestors of other parents, and
1947 remove duplicates.
1948 </p>
1949 </li>
1950 <li>
1952 If after this parent rewriting, &#8216;C&#8217;` is a root or merge commit (has
1953 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1954 Otherwise, it is replaced with its only parent.
1955 </p>
1956 </li>
1957 </ul></div>
1958 <div class="paragraph"><p>The effect of this is best shown by way of comparing to
1959 <em>--full-history</em> with parent rewriting. The example turns into:</p></div>
1960 <div class="listingblock">
1961 <div class="content">
1962 <pre><tt> .-A---M---N---O
1963 / / /
1964 I B D
1965 \ / /
1966 `---------'</tt></pre>
1967 </div></div>
1968 <div class="paragraph"><p>Note the major differences in <tt>N</tt> and <tt>P</tt> over <em>--full-history</em>:</p></div>
1969 <div class="ulist"><ul>
1970 <li>
1972 <tt>N</tt>'s parent list had <tt>I</tt> removed, because it is an ancestor of the
1973 other parent <tt>M</tt>. Still, <tt>N</tt> remained because it is !TREESAME.
1974 </p>
1975 </li>
1976 <li>
1978 <tt>P</tt>'s parent list similarly had <tt>I</tt> removed. <tt>P</tt> was then
1979 removed completely, because it had one parent and is TREESAME.
1980 </p>
1981 </li>
1982 </ul></div>
1983 </dd>
1984 </dl></div>
1985 <div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div>
1986 <div class="dlist"><dl>
1987 <dt class="hdlist1">
1988 --ancestry-path
1989 </dt>
1990 <dd>
1992 Limit the displayed commits to those directly on the ancestry
1993 chain between the "from" and "to" commits in the given commit
1994 range. I.e. only display commits that are ancestor of the "to"
1995 commit, and descendants of the "from" commit.
1996 </p>
1997 <div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
1998 <div class="listingblock">
1999 <div class="content">
2000 <pre><tt> D---E-------F
2001 / \ \
2002 B---C---G---H---I---J
2004 A-------K---------------L--M</tt></pre>
2005 </div></div>
2006 <div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <tt>M</tt>,
2007 but excludes the ones that are ancestors of <tt>D</tt>. This is useful to see
2008 what happened to the history leading to <tt>M</tt> since <tt>D</tt>, in the sense
2009 that "what does <tt>M</tt> have that did not exist in <tt>D</tt>". The result in this
2010 example would be all the commits, except <tt>A</tt> and <tt>B</tt> (and <tt>D</tt> itself,
2011 of course).</p></div>
2012 <div class="paragraph"><p>When we want to find out what commits in <tt>M</tt> are contaminated with the
2013 bug introduced by <tt>D</tt> and need fixing, however, we might want to view
2014 only the subset of <em>D..M</em> that are actually descendants of <tt>D</tt>, i.e.
2015 excluding <tt>C</tt> and <tt>K</tt>. This is exactly what the <em>--ancestry-path</em>
2016 option does. Applied to the <em>D..M</em> range, it results in:</p></div>
2017 <div class="listingblock">
2018 <div class="content">
2019 <pre><tt> E-------F
2021 G---H---I---J
2023 L--M</tt></pre>
2024 </div></div>
2025 </dd>
2026 </dl></div>
2027 <div class="paragraph"><p>The <em>--simplify-by-decoration</em> option allows you to view only the
2028 big picture of the topology of the history, by omitting commits
2029 that are not referenced by tags. Commits are marked as !TREESAME
2030 (in other words, kept after history simplification rules described
2031 above) if (1) they are referenced by tags, or (2) they change the
2032 contents of the paths given on the command line. All other
2033 commits are marked as TREESAME (subject to be simplified away).</p></div>
2034 <h3 id="_commit_ordering">Commit Ordering</h3><div style="clear:left"></div>
2035 <div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div>
2036 <div class="dlist"><dl>
2037 <dt class="hdlist1">
2038 --topo-order
2039 </dt>
2040 <dd>
2042 This option makes them appear in topological order (i.e.
2043 descendant commits are shown before their parents).
2044 </p>
2045 </dd>
2046 <dt class="hdlist1">
2047 --date-order
2048 </dt>
2049 <dd>
2051 This option is similar to <em>--topo-order</em> in the sense that no
2052 parent comes before all of its children, but otherwise things
2053 are still ordered in the commit timestamp order.
2054 </p>
2055 </dd>
2056 <dt class="hdlist1">
2057 --reverse
2058 </dt>
2059 <dd>
2061 Output the commits in reverse order.
2062 Cannot be combined with <em>--walk-reflogs</em>.
2063 </p>
2064 </dd>
2065 </dl></div>
2066 <h3 id="_object_traversal">Object Traversal</h3><div style="clear:left"></div>
2067 <div class="paragraph"><p>These options are mostly targeted for packing of git repositories.</p></div>
2068 <div class="dlist"><dl>
2069 <dt class="hdlist1">
2070 --objects
2071 </dt>
2072 <dd>
2074 Print the object IDs of any object referenced by the listed
2075 commits. <em>--objects foo ^bar</em> thus means "send me
2076 all object IDs which I need to download if I have the commit
2077 object <em>bar</em>, but not <em>foo</em>".
2078 </p>
2079 </dd>
2080 <dt class="hdlist1">
2081 --objects-edge
2082 </dt>
2083 <dd>
2085 Similar to <em>--objects</em>, but also print the IDs of excluded
2086 commits prefixed with a "-" character. This is used by
2087 <a href="git-pack-objects.html">git-pack-objects(1)</a> to build "thin" pack, which records
2088 objects in deltified form based on objects contained in these
2089 excluded commits to reduce network traffic.
2090 </p>
2091 </dd>
2092 <dt class="hdlist1">
2093 --unpacked
2094 </dt>
2095 <dd>
2097 Only useful with <em>--objects</em>; print the object IDs that are not
2098 in packs.
2099 </p>
2100 </dd>
2101 <dt class="hdlist1">
2102 --no-walk
2103 </dt>
2104 <dd>
2106 Only show the given revs, but do not traverse their ancestors.
2107 </p>
2108 </dd>
2109 <dt class="hdlist1">
2110 --do-walk
2111 </dt>
2112 <dd>
2114 Overrides a previous --no-walk.
2115 </p>
2116 </dd>
2117 </dl></div>
2118 </div>
2119 <h2 id="_pretty_formats">PRETTY FORMATS</h2>
2120 <div class="sectionbody">
2121 <div class="paragraph"><p>If the commit is a merge, and if the pretty-format
2122 is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
2123 inserted before the <em>Author:</em> line. This line begins with
2124 "Merge: " and the sha1s of ancestral commits are printed,
2125 separated by spaces. Note that the listed commits may not
2126 necessarily be the list of the <strong>direct</strong> parent commits if you
2127 have limited your view of history: for example, if you are
2128 only interested in changes related to a certain directory or
2129 file.</p></div>
2130 <div class="paragraph"><p>There are several built-in formats, and you can define
2131 additional formats by setting a pretty.&lt;name&gt;
2132 config option to either another format name, or a
2133 <em>format:</em> string, as described below (see
2134 <a href="git-config.html">git-config(1)</a>). Here are the details of the
2135 built-in formats:</p></div>
2136 <div class="ulist"><ul>
2137 <li>
2139 <em>oneline</em>
2140 </p>
2141 <div class="literalblock">
2142 <div class="content">
2143 <pre><tt>&lt;sha1&gt; &lt;title line&gt;</tt></pre>
2144 </div></div>
2145 <div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
2146 </li>
2147 <li>
2149 <em>short</em>
2150 </p>
2151 <div class="literalblock">
2152 <div class="content">
2153 <pre><tt>commit &lt;sha1&gt;
2154 Author: &lt;author&gt;</tt></pre>
2155 </div></div>
2156 <div class="literalblock">
2157 <div class="content">
2158 <pre><tt>&lt;title line&gt;</tt></pre>
2159 </div></div>
2160 </li>
2161 <li>
2163 <em>medium</em>
2164 </p>
2165 <div class="literalblock">
2166 <div class="content">
2167 <pre><tt>commit &lt;sha1&gt;
2168 Author: &lt;author&gt;
2169 Date: &lt;author date&gt;</tt></pre>
2170 </div></div>
2171 <div class="literalblock">
2172 <div class="content">
2173 <pre><tt>&lt;title line&gt;</tt></pre>
2174 </div></div>
2175 <div class="literalblock">
2176 <div class="content">
2177 <pre><tt>&lt;full commit message&gt;</tt></pre>
2178 </div></div>
2179 </li>
2180 <li>
2182 <em>full</em>
2183 </p>
2184 <div class="literalblock">
2185 <div class="content">
2186 <pre><tt>commit &lt;sha1&gt;
2187 Author: &lt;author&gt;
2188 Commit: &lt;committer&gt;</tt></pre>
2189 </div></div>
2190 <div class="literalblock">
2191 <div class="content">
2192 <pre><tt>&lt;title line&gt;</tt></pre>
2193 </div></div>
2194 <div class="literalblock">
2195 <div class="content">
2196 <pre><tt>&lt;full commit message&gt;</tt></pre>
2197 </div></div>
2198 </li>
2199 <li>
2201 <em>fuller</em>
2202 </p>
2203 <div class="literalblock">
2204 <div class="content">
2205 <pre><tt>commit &lt;sha1&gt;
2206 Author: &lt;author&gt;
2207 AuthorDate: &lt;author date&gt;
2208 Commit: &lt;committer&gt;
2209 CommitDate: &lt;committer date&gt;</tt></pre>
2210 </div></div>
2211 <div class="literalblock">
2212 <div class="content">
2213 <pre><tt>&lt;title line&gt;</tt></pre>
2214 </div></div>
2215 <div class="literalblock">
2216 <div class="content">
2217 <pre><tt>&lt;full commit message&gt;</tt></pre>
2218 </div></div>
2219 </li>
2220 <li>
2222 <em>email</em>
2223 </p>
2224 <div class="literalblock">
2225 <div class="content">
2226 <pre><tt>From &lt;sha1&gt; &lt;date&gt;
2227 From: &lt;author&gt;
2228 Date: &lt;author date&gt;
2229 Subject: [PATCH] &lt;title line&gt;</tt></pre>
2230 </div></div>
2231 <div class="literalblock">
2232 <div class="content">
2233 <pre><tt>&lt;full commit message&gt;</tt></pre>
2234 </div></div>
2235 </li>
2236 <li>
2238 <em>raw</em>
2239 </p>
2240 <div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
2241 stored in the commit object. Notably, the SHA1s are
2242 displayed in full, regardless of whether --abbrev or
2243 --no-abbrev are used, and <em>parents</em> information show the
2244 true parent commits, without taking grafts nor history
2245 simplification into account.</p></div>
2246 </li>
2247 <li>
2249 <em>format:&lt;string&gt;</em>
2250 </p>
2251 <div class="paragraph"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
2252 you want to show. It works a little bit like printf format,
2253 with the notable exception that you get a newline with <em>%n</em>
2254 instead of <em>\n</em>.</p></div>
2255 <div class="paragraph"><p>E.g, <em>format:"The author of %h was %an, %ar%nThe title was &gt;&gt;%s&lt;&lt;%n"</em>
2256 would show something like this:</p></div>
2257 <div class="listingblock">
2258 <div class="content">
2259 <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago
2260 The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</tt></pre>
2261 </div></div>
2262 <div class="paragraph"><p>The placeholders are:</p></div>
2263 <div class="ulist"><ul>
2264 <li>
2266 <em>%H</em>: commit hash
2267 </p>
2268 </li>
2269 <li>
2271 <em>%h</em>: abbreviated commit hash
2272 </p>
2273 </li>
2274 <li>
2276 <em>%T</em>: tree hash
2277 </p>
2278 </li>
2279 <li>
2281 <em>%t</em>: abbreviated tree hash
2282 </p>
2283 </li>
2284 <li>
2286 <em>%P</em>: parent hashes
2287 </p>
2288 </li>
2289 <li>
2291 <em>%p</em>: abbreviated parent hashes
2292 </p>
2293 </li>
2294 <li>
2296 <em>%an</em>: author name
2297 </p>
2298 </li>
2299 <li>
2301 <em>%aN</em>: author name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2302 </p>
2303 </li>
2304 <li>
2306 <em>%ae</em>: author email
2307 </p>
2308 </li>
2309 <li>
2311 <em>%aE</em>: author email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2312 </p>
2313 </li>
2314 <li>
2316 <em>%ad</em>: author date (format respects --date= option)
2317 </p>
2318 </li>
2319 <li>
2321 <em>%aD</em>: author date, RFC2822 style
2322 </p>
2323 </li>
2324 <li>
2326 <em>%ar</em>: author date, relative
2327 </p>
2328 </li>
2329 <li>
2331 <em>%at</em>: author date, UNIX timestamp
2332 </p>
2333 </li>
2334 <li>
2336 <em>%ai</em>: author date, ISO 8601 format
2337 </p>
2338 </li>
2339 <li>
2341 <em>%cn</em>: committer name
2342 </p>
2343 </li>
2344 <li>
2346 <em>%cN</em>: committer name (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2347 </p>
2348 </li>
2349 <li>
2351 <em>%ce</em>: committer email
2352 </p>
2353 </li>
2354 <li>
2356 <em>%cE</em>: committer email (respecting .mailmap, see <a href="git-shortlog.html">git-shortlog(1)</a> or <a href="git-blame.html">git-blame(1)</a>)
2357 </p>
2358 </li>
2359 <li>
2361 <em>%cd</em>: committer date
2362 </p>
2363 </li>
2364 <li>
2366 <em>%cD</em>: committer date, RFC2822 style
2367 </p>
2368 </li>
2369 <li>
2371 <em>%cr</em>: committer date, relative
2372 </p>
2373 </li>
2374 <li>
2376 <em>%ct</em>: committer date, UNIX timestamp
2377 </p>
2378 </li>
2379 <li>
2381 <em>%ci</em>: committer date, ISO 8601 format
2382 </p>
2383 </li>
2384 <li>
2386 <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
2387 </p>
2388 </li>
2389 <li>
2391 <em>%e</em>: encoding
2392 </p>
2393 </li>
2394 <li>
2396 <em>%s</em>: subject
2397 </p>
2398 </li>
2399 <li>
2401 <em>%f</em>: sanitized subject line, suitable for a filename
2402 </p>
2403 </li>
2404 <li>
2406 <em>%b</em>: body
2407 </p>
2408 </li>
2409 <li>
2411 <em>%B</em>: raw body (unwrapped subject and body)
2412 </p>
2413 </li>
2414 <li>
2416 <em>%N</em>: commit notes
2417 </p>
2418 </li>
2419 <li>
2421 <em>%gD</em>: reflog selector, e.g., <tt>refs/stash@{1}</tt>
2422 </p>
2423 </li>
2424 <li>
2426 <em>%gd</em>: shortened reflog selector, e.g., <tt>stash@{1}</tt>
2427 </p>
2428 </li>
2429 <li>
2431 <em>%gs</em>: reflog subject
2432 </p>
2433 </li>
2434 <li>
2436 <em>%Cred</em>: switch color to red
2437 </p>
2438 </li>
2439 <li>
2441 <em>%Cgreen</em>: switch color to green
2442 </p>
2443 </li>
2444 <li>
2446 <em>%Cblue</em>: switch color to blue
2447 </p>
2448 </li>
2449 <li>
2451 <em>%Creset</em>: reset color
2452 </p>
2453 </li>
2454 <li>
2456 <em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option
2457 </p>
2458 </li>
2459 <li>
2461 <em>%m</em>: left, right or boundary mark
2462 </p>
2463 </li>
2464 <li>
2466 <em>%n</em>: newline
2467 </p>
2468 </li>
2469 <li>
2471 <em>%%</em>: a raw <em>%</em>
2472 </p>
2473 </li>
2474 <li>
2476 <em>%x00</em>: print a byte from a hex code
2477 </p>
2478 </li>
2479 <li>
2481 <em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>: switch line wrapping, like the -w option of
2482 <a href="git-shortlog.html">git-shortlog(1)</a>.
2483 </p>
2484 </li>
2485 </ul></div>
2486 </li>
2487 </ul></div>
2488 <div class="admonitionblock">
2489 <table><tr>
2490 <td class="icon">
2491 <div class="title">Note</div>
2492 </td>
2493 <td class="content">Some placeholders may depend on other options given to the
2494 revision traversal engine. For example, the <tt>%g*</tt> reflog options will
2495 insert an empty string unless we are traversing reflog entries (e.g., by
2496 <tt>git log -g</tt>). The <tt>%d</tt> placeholder will use the "short" decoration
2497 format if <tt>--decorate</tt> was not already provided on the command line.</td>
2498 </tr></table>
2499 </div>
2500 <div class="paragraph"><p>If you add a <tt>&#43;</tt> (plus sign) after <em>%</em> of a placeholder, a line-feed
2501 is inserted immediately before the expansion if and only if the
2502 placeholder expands to a non-empty string.</p></div>
2503 <div class="paragraph"><p>If you add a <tt>-</tt> (minus sign) after <em>%</em> of a placeholder, line-feeds that
2504 immediately precede the expansion are deleted if and only if the
2505 placeholder expands to an empty string.</p></div>
2506 <div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
2507 is inserted immediately before the expansion if and only if the
2508 placeholder expands to a non-empty string.</p></div>
2509 <div class="ulist"><ul>
2510 <li>
2512 <em>tformat:</em>
2513 </p>
2514 <div class="paragraph"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
2515 provides "terminator" semantics instead of "separator" semantics. In
2516 other words, each commit has the message terminator character (usually a
2517 newline) appended, rather than a separator placed between entries.
2518 This means that the final entry of a single-line format will be properly
2519 terminated with a new line, just as the "oneline" format does.
2520 For example:</p></div>
2521 <div class="listingblock">
2522 <div class="content">
2523 <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \
2524 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
2525 4da45be
2526 7134973 -- NO NEWLINE
2528 $ git log -2 --pretty=tformat:%h 4da45bef \
2529 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
2530 4da45be
2531 7134973</tt></pre>
2532 </div></div>
2533 <div class="paragraph"><p>In addition, any unrecognized string that has a <tt>%</tt> in it is interpreted
2534 as if it has <tt>tformat:</tt> in front of it. For example, these two are
2535 equivalent:</p></div>
2536 <div class="listingblock">
2537 <div class="content">
2538 <pre><tt>$ git log -2 --pretty=tformat:%h 4da45bef
2539 $ git log -2 --pretty=%h 4da45bef</tt></pre>
2540 </div></div>
2541 </li>
2542 </ul></div>
2543 </div>
2544 <h2 id="_generating_patches_with_p">Generating patches with -p</h2>
2545 <div class="sectionbody">
2546 <div class="paragraph"><p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
2547 with a <em>-p</em> option, "git diff" without the <em>--raw</em> option, or
2548 "git log" with the "-p" option, they
2549 do not produce the output described above; instead they produce a
2550 patch file. You can customize the creation of such patches via the
2551 GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p></div>
2552 <div class="paragraph"><p>What the -p option produces is slightly different from the traditional
2553 diff format:</p></div>
2554 <div class="olist arabic"><ol class="arabic">
2555 <li>
2557 It is preceded with a "git diff" header that looks like this:
2558 </p>
2559 <div class="literalblock">
2560 <div class="content">
2561 <pre><tt>diff --git a/file1 b/file2</tt></pre>
2562 </div></div>
2563 <div class="paragraph"><p>The <tt>a/</tt> and <tt>b/</tt> filenames are the same unless rename/copy is
2564 involved. Especially, even for a creation or a deletion,
2565 <tt>/dev/null</tt> is <em>not</em> used in place of the <tt>a/</tt> or <tt>b/</tt> filenames.</p></div>
2566 <div class="paragraph"><p>When rename/copy is involved, <tt>file1</tt> and <tt>file2</tt> show the
2567 name of the source file of the rename/copy and the name of
2568 the file that rename/copy produces, respectively.</p></div>
2569 </li>
2570 <li>
2572 It is followed by one or more extended header lines:
2573 </p>
2574 <div class="literalblock">
2575 <div class="content">
2576 <pre><tt>old mode &lt;mode&gt;
2577 new mode &lt;mode&gt;
2578 deleted file mode &lt;mode&gt;
2579 new file mode &lt;mode&gt;
2580 copy from &lt;path&gt;
2581 copy to &lt;path&gt;
2582 rename from &lt;path&gt;
2583 rename to &lt;path&gt;
2584 similarity index &lt;number&gt;
2585 dissimilarity index &lt;number&gt;
2586 index &lt;hash&gt;..&lt;hash&gt; &lt;mode&gt;</tt></pre>
2587 </div></div>
2588 <div class="paragraph"><p>File modes are printed as 6-digit octal numbers including the file type
2589 and file permission bits.</p></div>
2590 <div class="paragraph"><p>Path names in extended headers do not include the <tt>a/</tt> and <tt>b/</tt> prefixes.</p></div>
2591 <div class="paragraph"><p>The similarity index is the percentage of unchanged lines, and
2592 the dissimilarity index is the percentage of changed lines. It
2593 is a rounded down integer, followed by a percent sign. The
2594 similarity index value of 100% is thus reserved for two equal
2595 files, while 100% dissimilarity means that no line from the old
2596 file made it into the new one.</p></div>
2597 <div class="paragraph"><p>The index line includes the SHA-1 checksum before and after the change.
2598 The &lt;mode&gt; is included if the file mode does not change; otherwise,
2599 separate lines indicate the old and the new mode.</p></div>
2600 </li>
2601 <li>
2603 TAB, LF, double quote and backslash characters in pathnames
2604 are represented as <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt> and <tt>\\</tt>, respectively.
2605 If there is need for such substitution then the whole
2606 pathname is put in double quotes.
2607 </p>
2608 </li>
2609 <li>
2611 All the <tt>file1</tt> files in the output refer to files before the
2612 commit, and all the <tt>file2</tt> files refer to files after the commit.
2613 It is incorrect to apply each change to each file sequentially. For
2614 example, this patch will swap a and b:
2615 </p>
2616 <div class="literalblock">
2617 <div class="content">
2618 <pre><tt>diff --git a/a b/b
2619 rename from a
2620 rename to b
2621 diff --git a/b b/a
2622 rename from b
2623 rename to a</tt></pre>
2624 </div></div>
2625 </li>
2626 </ol></div>
2627 </div>
2628 <h2 id="_combined_diff_format">combined diff format</h2>
2629 <div class="sectionbody">
2630 <div class="paragraph"><p>"git-diff-tree", "git-diff-files" and "git-diff" can take <em>-c</em> or
2631 <em>--cc</em> option to produce <em>combined diff</em>. For showing a merge commit
2632 with "git log -p", this is the default format; you can force showing
2633 full diff with the <em>-m</em> option.
2634 A <em>combined diff</em> format looks like this:</p></div>
2635 <div class="listingblock">
2636 <div class="content">
2637 <pre><tt>diff --combined describe.c
2638 index fabadb8,cc95eb0..4866510
2639 --- a/describe.c
2640 +++ b/describe.c
2641 @@@ -98,20 -98,12 +98,20 @@@
2642 return (a_date &gt; b_date) ? -1 : (a_date == b_date) ? 0 : 1;
2645 - static void describe(char *arg)
2646 -static void describe(struct commit *cmit, int last_one)
2647 ++static void describe(char *arg, int last_one)
2649 + unsigned char sha1[20];
2650 + struct commit *cmit;
2651 struct commit_list *list;
2652 static int initialized = 0;
2653 struct commit_name *n;
2655 + if (get_sha1(arg, sha1) &lt; 0)
2656 + usage(describe_usage);
2657 + cmit = lookup_commit_reference(sha1);
2658 + if (!cmit)
2659 + usage(describe_usage);
2661 if (!initialized) {
2662 initialized = 1;
2663 for_each_ref(get_name);</tt></pre>
2664 </div></div>
2665 <div class="olist arabic"><ol class="arabic">
2666 <li>
2668 It is preceded with a "git diff" header, that looks like
2669 this (when <em>-c</em> option is used):
2670 </p>
2671 <div class="literalblock">
2672 <div class="content">
2673 <pre><tt>diff --combined file</tt></pre>
2674 </div></div>
2675 <div class="paragraph"><p>or like this (when <em>--cc</em> option is used):</p></div>
2676 <div class="literalblock">
2677 <div class="content">
2678 <pre><tt>diff --cc file</tt></pre>
2679 </div></div>
2680 </li>
2681 <li>
2683 It is followed by one or more extended header lines
2684 (this example shows a merge with two parents):
2685 </p>
2686 <div class="literalblock">
2687 <div class="content">
2688 <pre><tt>index &lt;hash&gt;,&lt;hash&gt;..&lt;hash&gt;
2689 mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;
2690 new file mode &lt;mode&gt;
2691 deleted file mode &lt;mode&gt;,&lt;mode&gt;</tt></pre>
2692 </div></div>
2693 <div class="paragraph"><p>The <tt>mode &lt;mode&gt;,&lt;mode&gt;..&lt;mode&gt;</tt> line appears only if at least one of
2694 the &lt;mode&gt; is different from the rest. Extended headers with
2695 information about detected contents movement (renames and
2696 copying detection) are designed to work with diff of two
2697 &lt;tree-ish&gt; and are not used by combined diff format.</p></div>
2698 </li>
2699 <li>
2701 It is followed by two-line from-file/to-file header
2702 </p>
2703 <div class="literalblock">
2704 <div class="content">
2705 <pre><tt>--- a/file
2706 +++ b/file</tt></pre>
2707 </div></div>
2708 <div class="paragraph"><p>Similar to two-line header for traditional <em>unified</em> diff
2709 format, <tt>/dev/null</tt> is used to signal created or deleted
2710 files.</p></div>
2711 </li>
2712 <li>
2714 Chunk header format is modified to prevent people from
2715 accidentally feeding it to <tt>patch -p1</tt>. Combined diff format
2716 was created for review of merge commit changes, and was not
2717 meant for apply. The change is similar to the change in the
2718 extended <em>index</em> header:
2719 </p>
2720 <div class="literalblock">
2721 <div class="content">
2722 <pre><tt>@@@ &lt;from-file-range&gt; &lt;from-file-range&gt; &lt;to-file-range&gt; @@@</tt></pre>
2723 </div></div>
2724 <div class="paragraph"><p>There are (number of parents + 1) <tt>@</tt> characters in the chunk
2725 header for combined diff format.</p></div>
2726 </li>
2727 </ol></div>
2728 <div class="paragraph"><p>Unlike the traditional <em>unified</em> diff format, which shows two
2729 files A and B with a single column that has <tt>-</tt> (minus&#8201;&#8212;&#8201;appears in A but removed in B), <tt>+</tt> (plus&#8201;&#8212;&#8201;missing in A but
2730 added to B), or <tt>" "</tt> (space&#8201;&#8212;&#8201;unchanged) prefix, this format
2731 compares two or more files file1, file2,&#8230; with one file X, and
2732 shows how X differs from each of fileN. One column for each of
2733 fileN is prepended to the output line to note how X&#8217;s line is
2734 different from it.</p></div>
2735 <div class="paragraph"><p>A <tt>-</tt> character in the column N means that the line appears in
2736 fileN but it does not appear in the result. A <tt>+</tt> character
2737 in the column N means that the line appears in the result,
2738 and fileN does not have that line (in other words, the line was
2739 added, from the point of view of that parent).</p></div>
2740 <div class="paragraph"><p>In the above example output, the function signature was changed
2741 from both files (hence two <tt>-</tt> removals from both file1 and
2742 file2, plus <tt>++</tt> to mean one line that was added does not appear
2743 in either file1 nor file2). Also eight other lines are the same
2744 from file1 but do not appear in file2 (hence prefixed with <tt>&#43;</tt>).</p></div>
2745 <div class="paragraph"><p>When shown by <tt>git diff-tree -c</tt>, it compares the parents of a
2746 merge commit with the merge result (i.e. file1..fileN are the
2747 parents). When shown by <tt>git diff-files -c</tt>, it compares the
2748 two unresolved merge parents with the working tree file
2749 (i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka
2750 "their version").</p></div>
2751 </div>
2752 <h2 id="_examples">Examples</h2>
2753 <div class="sectionbody">
2754 <div class="dlist"><dl>
2755 <dt class="hdlist1">
2756 git log --no-merges
2757 </dt>
2758 <dd>
2760 Show the whole commit history, but skip any merges
2761 </p>
2762 </dd>
2763 <dt class="hdlist1">
2764 git log v2.6.12.. include/scsi drivers/scsi
2765 </dt>
2766 <dd>
2768 Show all commits since version <em>v2.6.12</em> that changed any file
2769 in the include/scsi or drivers/scsi subdirectories
2770 </p>
2771 </dd>
2772 <dt class="hdlist1">
2773 git log --since="2 weeks ago" -- gitk
2774 </dt>
2775 <dd>
2777 Show the changes during the last two weeks to the file <em>gitk</em>.
2778 The "--" is necessary to avoid confusion with the <strong>branch</strong> named
2779 <em>gitk</em>
2780 </p>
2781 </dd>
2782 <dt class="hdlist1">
2783 git log --name-status release..test
2784 </dt>
2785 <dd>
2787 Show the commits that are in the "test" branch but not yet
2788 in the "release" branch, along with the list of paths
2789 each commit modifies.
2790 </p>
2791 </dd>
2792 <dt class="hdlist1">
2793 git log --follow builtin-rev-list.c
2794 </dt>
2795 <dd>
2797 Shows the commits that changed builtin-rev-list.c, including
2798 those commits that occurred before the file was given its
2799 present name.
2800 </p>
2801 </dd>
2802 <dt class="hdlist1">
2803 git log --branches --not --remotes=origin
2804 </dt>
2805 <dd>
2807 Shows all commits that are in any of local branches but not in
2808 any of remote-tracking branches for <em>origin</em> (what you have that
2809 origin doesn&#8217;t).
2810 </p>
2811 </dd>
2812 <dt class="hdlist1">
2813 git log master --not --remotes=*/master
2814 </dt>
2815 <dd>
2817 Shows all commits that are in local master but not in any remote
2818 repository master branches.
2819 </p>
2820 </dd>
2821 <dt class="hdlist1">
2822 git log -p -m --first-parent
2823 </dt>
2824 <dd>
2826 Shows the history including change diffs, but only from the
2827 "main branch" perspective, skipping commits that come from merged
2828 branches, and showing full diffs of changes introduced by the merges.
2829 This makes sense only when following a strict policy of merging all
2830 topic branches when staying on a single integration branch.
2831 </p>
2832 </dd>
2833 </dl></div>
2834 </div>
2835 <h2 id="_discussion">Discussion</h2>
2836 <div class="sectionbody">
2837 <div class="paragraph"><p>At the core level, git is character encoding agnostic.</p></div>
2838 <div class="ulist"><ul>
2839 <li>
2841 The pathnames recorded in the index and in the tree objects
2842 are treated as uninterpreted sequences of non-NUL bytes.
2843 What readdir(2) returns are what are recorded and compared
2844 with the data git keeps track of, which in turn are expected
2845 to be what lstat(2) and creat(2) accepts. There is no such
2846 thing as pathname encoding translation.
2847 </p>
2848 </li>
2849 <li>
2851 The contents of the blob objects are uninterpreted sequences
2852 of bytes. There is no encoding translation at the core
2853 level.
2854 </p>
2855 </li>
2856 <li>
2858 The commit log messages are uninterpreted sequences of non-NUL
2859 bytes.
2860 </p>
2861 </li>
2862 </ul></div>
2863 <div class="paragraph"><p>Although we encourage that the commit log messages are encoded
2864 in UTF-8, both the core and git Porcelain are designed not to
2865 force UTF-8 on projects. If all participants of a particular
2866 project find it more convenient to use legacy encodings, git
2867 does not forbid it. However, there are a few things to keep in
2868 mind.</p></div>
2869 <div class="olist arabic"><ol class="arabic">
2870 <li>
2872 <em>git commit</em> and <em>git commit-tree</em> issues
2873 a warning if the commit log message given to it does not look
2874 like a valid UTF-8 string, unless you explicitly say your
2875 project uses a legacy encoding. The way to say this is to
2876 have i18n.commitencoding in <tt>.git/config</tt> file, like this:
2877 </p>
2878 <div class="listingblock">
2879 <div class="content">
2880 <pre><tt>[i18n]
2881 commitencoding = ISO-8859-1</tt></pre>
2882 </div></div>
2883 <div class="paragraph"><p>Commit objects created with the above setting record the value
2884 of <tt>i18n.commitencoding</tt> in its <tt>encoding</tt> header. This is to
2885 help other people who look at them later. Lack of this header
2886 implies that the commit log message is encoded in UTF-8.</p></div>
2887 </li>
2888 <li>
2890 <em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
2891 <tt>encoding</tt> header of a commit object, and try to re-code the
2892 log message into UTF-8 unless otherwise specified. You can
2893 specify the desired output encoding with
2894 <tt>i18n.logoutputencoding</tt> in <tt>.git/config</tt> file, like this:
2895 </p>
2896 <div class="listingblock">
2897 <div class="content">
2898 <pre><tt>[i18n]
2899 logoutputencoding = ISO-8859-1</tt></pre>
2900 </div></div>
2901 <div class="paragraph"><p>If you do not have this configuration variable, the value of
2902 <tt>i18n.commitencoding</tt> is used instead.</p></div>
2903 </li>
2904 </ol></div>
2905 <div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log
2906 message when a commit is made to force UTF-8 at the commit
2907 object level, because re-coding to UTF-8 is not necessarily a
2908 reversible operation.</p></div>
2909 </div>
2910 <h2 id="_configuration">Configuration</h2>
2911 <div class="sectionbody">
2912 <div class="paragraph"><p>See <a href="git-config.html">git-config(1)</a> for core variables and <a href="git-diff.html">git-diff(1)</a>
2913 for settings related to diff generation.</p></div>
2914 <div class="dlist"><dl>
2915 <dt class="hdlist1">
2916 format.pretty
2917 </dt>
2918 <dd>
2920 Default for the <tt>--format</tt> option. (See "PRETTY FORMATS" above.)
2921 Defaults to "medium".
2922 </p>
2923 </dd>
2924 <dt class="hdlist1">
2925 i18n.logOutputEncoding
2926 </dt>
2927 <dd>
2929 Encoding to use when displaying logs. (See "Discussion", above.)
2930 Defaults to the value of <tt>i18n.commitEncoding</tt> if set, UTF-8
2931 otherwise.
2932 </p>
2933 </dd>
2934 <dt class="hdlist1">
2935 log.date
2936 </dt>
2937 <dd>
2939 Default format for human-readable dates. (Compare the
2940 <tt>--date</tt> option.) Defaults to "default", which means to write
2941 dates like <tt>Sat May 8 19:35:34 2010 -0500</tt>.
2942 </p>
2943 </dd>
2944 <dt class="hdlist1">
2945 log.showroot
2946 </dt>
2947 <dd>
2949 If <tt>false</tt>, <em>git log</em> and related commands will not treat the
2950 initial commit as a big creation event. Any root commits in
2951 <tt>git log -p</tt> output would be shown without a diff attached.
2952 The default is <tt>true</tt>.
2953 </p>
2954 </dd>
2955 <dt class="hdlist1">
2956 mailmap.file
2957 </dt>
2958 <dd>
2960 See <a href="git-shortlog.html">git-shortlog(1)</a>.
2961 </p>
2962 </dd>
2963 <dt class="hdlist1">
2964 notes.displayRef
2965 </dt>
2966 <dd>
2968 Which refs, in addition to the default set by <tt>core.notesRef</tt>
2969 or <em>GIT_NOTES_REF</em>, to read notes from when showing commit
2970 messages with the <em>log</em> family of commands. See
2971 <a href="git-notes.html">git-notes(1)</a>.
2972 </p>
2973 <div class="paragraph"><p>May be an unabbreviated ref name or a glob and may be specified
2974 multiple times. A warning will be issued for refs that do not exist,
2975 but a glob that does not match any refs is silently ignored.</p></div>
2976 <div class="paragraph"><p>This setting can be disabled by the <tt>--no-standard-notes</tt> option,
2977 overridden by the <em>GIT_NOTES_DISPLAY_REF</em> environment variable,
2978 and supplemented by the <tt>--show-notes</tt> option.</p></div>
2979 </dd>
2980 </dl></div>
2981 </div>
2982 <h2 id="_author">Author</h2>
2983 <div class="sectionbody">
2984 <div class="paragraph"><p>Written by Linus Torvalds &lt;<a href="mailto:torvalds@osdl.org">torvalds@osdl.org</a>&gt;</p></div>
2985 </div>
2986 <h2 id="_documentation">Documentation</h2>
2987 <div class="sectionbody">
2988 <div class="paragraph"><p>Documentation by David Greaves, Junio C Hamano and the git-list &lt;<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>&gt;.</p></div>
2989 </div>
2990 <h2 id="_git">GIT</h2>
2991 <div class="sectionbody">
2992 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
2993 </div>
2994 <div id="footer">
2995 <div id="footer-text">
2996 Last updated 2010-11-25 03:13:42 UTC
2997 </div>
2998 </div>
2999 </body>
3000 </html>