Autogenerated HTML docs for v1.7.3.3-585-g74f6e
[git/jnareb-git.git] / git-rev-list.html
blob2198a7ece948e501232fd08373e07c3cea360a59
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-rev-list(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-rev-list(1) Manual Page
407 </h1>
408 <h2>NAME</h2>
409 <div class="sectionbody">
410 <p>git-rev-list -
411 Lists commit objects in reverse chronological order
412 </p>
413 </div>
414 </div>
415 <h2 id="_synopsis">SYNOPSIS</h2>
416 <div class="sectionbody">
417 <div class="verseblock">
418 <div class="verseblock-content"><em>git rev-list</em> [ --max-count=&lt;number&gt; ]
419 [ --skip=&lt;number&gt; ]
420 [ --max-age=&lt;timestamp&gt; ]
421 [ --min-age=&lt;timestamp&gt; ]
422 [ --sparse ]
423 [ --merges ]
424 [ --no-merges ]
425 [ --first-parent ]
426 [ --remove-empty ]
427 [ --full-history ]
428 [ --not ]
429 [ --all ]
430 [ --branches[=&lt;pattern&gt;] ]
431 [ --tags[=&lt;pattern&gt;] ]
432 [ --remotes[=&lt;pattern&gt;] ]
433 [ --glob=&lt;glob-pattern&gt; ]
434 [ --stdin ]
435 [ --quiet ]
436 [ --topo-order ]
437 [ --parents ]
438 [ --timestamp ]
439 [ --left-right ]
440 [ --cherry-pick ]
441 [ --encoding[=&lt;encoding&gt;] ]
442 [ --(author|committer|grep)=&lt;pattern&gt; ]
443 [ --regexp-ignore-case | -i ]
444 [ --extended-regexp | -E ]
445 [ --fixed-strings | -F ]
446 [ --date=(local|relative|default|iso|rfc|short) ]
447 [ [--objects | --objects-edge] [ --unpacked ] ]
448 [ --pretty | --header ]
449 [ --bisect ]
450 [ --bisect-vars ]
451 [ --bisect-all ]
452 [ --merge ]
453 [ --reverse ]
454 [ --walk-reflogs ]
455 [ --no-walk ] [ --do-walk ]
456 &lt;commit&gt;&#8230; [ -- &lt;paths&gt;&#8230; ]</div>
457 <div class="verseblock-attribution">
458 </div></div>
459 </div>
460 <h2 id="_description">DESCRIPTION</h2>
461 <div class="sectionbody">
462 <div class="paragraph"><p>List commits that are reachable by following the <tt>parent</tt> links from the
463 given commit(s), but exclude commits that are reachable from the one(s)
464 given with a <em>&#94;</em> in front of them. The output is given in reverse
465 chronological order by default.</p></div>
466 <div class="paragraph"><p>You can think of this as a set operation. Commits given on the command
467 line form a set of commits that are reachable from any of them, and then
468 commits reachable from any of the ones given with <em>&#94;</em> in front are
469 subtracted from that set. The remaining commits are what comes out in the
470 command&#8217;s output. Various other options and paths parameters can be used
471 to further limit the result.</p></div>
472 <div class="paragraph"><p>Thus, the following command:</p></div>
473 <div class="listingblock">
474 <div class="content">
475 <pre><tt> $ git rev-list foo bar ^baz</tt></pre>
476 </div></div>
477 <div class="paragraph"><p>means "list all the commits which are reachable from <em>foo</em> or <em>bar</em>, but
478 not from <em>baz</em>".</p></div>
479 <div class="paragraph"><p>A special notation "<em>&lt;commit1&gt;</em>..<em>&lt;commit2&gt;</em>" can be used as a
480 short-hand for "&#94;<em>&lt;commit1&gt;</em> <em>&lt;commit2&gt;</em>". For example, either of
481 the following may be used interchangeably:</p></div>
482 <div class="listingblock">
483 <div class="content">
484 <pre><tt> $ git rev-list origin..HEAD
485 $ git rev-list HEAD ^origin</tt></pre>
486 </div></div>
487 <div class="paragraph"><p>Another special notation is "<em>&lt;commit1&gt;</em>&#8230;<em>&lt;commit2&gt;</em>" which is useful
488 for merges. The resulting set of commits is the symmetric difference
489 between the two operands. The following two commands are equivalent:</p></div>
490 <div class="listingblock">
491 <div class="content">
492 <pre><tt> $ git rev-list A B --not $(git merge-base --all A B)
493 $ git rev-list A...B</tt></pre>
494 </div></div>
495 <div class="paragraph"><p><em>rev-list</em> is a very essential git command, since it
496 provides the ability to build and traverse commit ancestry graphs. For
497 this reason, it has a lot of different options that enables it to be
498 used by commands as different as <em>git bisect</em> and
499 <em>git repack</em>.</p></div>
500 </div>
501 <h2 id="_options">OPTIONS</h2>
502 <div class="sectionbody">
503 <h3 id="_commit_formatting">Commit Formatting</h3><div style="clear:left"></div>
504 <div class="paragraph"><p>Using these options, <a href="git-rev-list.html">git-rev-list(1)</a> will act similar to the
505 more specialized family of commit log tools: <a href="git-log.html">git-log(1)</a>,
506 <a href="git-show.html">git-show(1)</a>, and <a href="git-whatchanged.html">git-whatchanged(1)</a></p></div>
507 <div class="dlist"><dl>
508 <dt class="hdlist1">
509 --pretty[=&lt;format&gt;]
510 </dt>
511 <dt class="hdlist1">
512 --format=&lt;format&gt;
513 </dt>
514 <dd>
516 Pretty-print the contents of the commit logs in a given format,
517 where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
518 <em>full</em>, <em>fuller</em>, <em>email</em>, <em>raw</em> and <em>format:&lt;string&gt;</em>. See
519 the "PRETTY FORMATS" section for some additional details for each
520 format. When omitted, the format defaults to <em>medium</em>.
521 </p>
522 <div class="paragraph"><p>Note: you can specify the default pretty format in the repository
523 configuration (see <a href="git-config.html">git-config(1)</a>).</p></div>
524 </dd>
525 <dt class="hdlist1">
526 --abbrev-commit
527 </dt>
528 <dd>
530 Instead of showing the full 40-byte hexadecimal commit object
531 name, show only a partial prefix. Non default number of
532 digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
533 diff output, if it is displayed).
534 </p>
535 <div class="paragraph"><p>This should make "--pretty=oneline" a whole lot more readable for
536 people using 80-column terminals.</p></div>
537 </dd>
538 <dt class="hdlist1">
539 --oneline
540 </dt>
541 <dd>
543 This is a shorthand for "--pretty=oneline --abbrev-commit"
544 used together.
545 </p>
546 </dd>
547 <dt class="hdlist1">
548 --encoding[=&lt;encoding&gt;]
549 </dt>
550 <dd>
552 The commit objects record the encoding used for the log message
553 in their encoding header; this option can be used to tell the
554 command to re-code the commit log message in the encoding
555 preferred by the user. For non plumbing commands this
556 defaults to UTF-8.
557 </p>
558 </dd>
559 <dt class="hdlist1">
560 --no-notes
561 </dt>
562 <dt class="hdlist1">
563 --show-notes[=&lt;ref&gt;]
564 </dt>
565 <dd>
567 Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
568 commit, when showing the commit log message. This is the default
569 for <tt>git log</tt>, <tt>git show</tt> and <tt>git whatchanged</tt> commands when
570 there is no <tt>--pretty</tt>, <tt>--format</tt> nor <tt>--oneline</tt> option is
571 given on the command line.
572 </p>
573 <div class="paragraph"><p>With an optional argument, add this ref to the list of notes. The ref
574 is taken to be in <tt>refs/notes/</tt> if it is not qualified.</p></div>
575 </dd>
576 <dt class="hdlist1">
577 --[no-]standard-notes
578 </dt>
579 <dd>
581 Enable or disable populating the notes ref list from the
582 <em>core.notesRef</em> and <em>notes.displayRef</em> variables (or
583 corresponding environment overrides). Enabled by default.
584 See <a href="git-config.html">git-config(1)</a>.
585 </p>
586 </dd>
587 <dt class="hdlist1">
588 --relative-date
589 </dt>
590 <dd>
592 Synonym for <tt>--date=relative</tt>.
593 </p>
594 </dd>
595 <dt class="hdlist1">
596 --date=(relative|local|default|iso|rfc|short|raw)
597 </dt>
598 <dd>
600 Only takes effect for dates shown in human-readable format, such
601 as when using "--pretty". <tt>log.date</tt> config variable sets a default
602 value for log command&#8217;s --date option.
603 </p>
604 <div class="paragraph"><p><tt>--date=relative</tt> shows dates relative to the current time,
605 e.g. "2 hours ago".</p></div>
606 <div class="paragraph"><p><tt>--date=local</tt> shows timestamps in user&#8217;s local timezone.</p></div>
607 <div class="paragraph"><p><tt>--date=iso</tt> (or <tt>--date=iso8601</tt>) shows timestamps in ISO 8601 format.</p></div>
608 <div class="paragraph"><p><tt>--date=rfc</tt> (or <tt>--date=rfc2822</tt>) shows timestamps in RFC 2822
609 format, often found in E-mail messages.</p></div>
610 <div class="paragraph"><p><tt>--date=short</tt> shows only date but not time, in <tt>YYYY-MM-DD</tt> format.</p></div>
611 <div class="paragraph"><p><tt>--date=raw</tt> shows the date in the internal raw git format <tt>%s %z</tt> format.</p></div>
612 <div class="paragraph"><p><tt>--date=default</tt> shows timestamps in the original timezone
613 (either committer&#8217;s or author&#8217;s).</p></div>
614 </dd>
615 <dt class="hdlist1">
616 --header
617 </dt>
618 <dd>
620 Print the contents of the commit in raw-format; each record is
621 separated with a NUL character.
622 </p>
623 </dd>
624 <dt class="hdlist1">
625 --parents
626 </dt>
627 <dd>
629 Print also the parents of the commit (in the form "commit parent&#8230;").
630 Also enables parent rewriting, see <em>History Simplification</em> below.
631 </p>
632 </dd>
633 <dt class="hdlist1">
634 --children
635 </dt>
636 <dd>
638 Print also the children of the commit (in the form "commit child&#8230;").
639 Also enables parent rewriting, see <em>History Simplification</em> below.
640 </p>
641 </dd>
642 <dt class="hdlist1">
643 --timestamp
644 </dt>
645 <dd>
647 Print the raw commit timestamp.
648 </p>
649 </dd>
650 <dt class="hdlist1">
651 --left-right
652 </dt>
653 <dd>
655 Mark which side of a symmetric diff a commit is reachable from.
656 Commits from the left side are prefixed with <tt>&lt;</tt> and those from
657 the right with <tt>&gt;</tt>. If combined with <tt>--boundary</tt>, those
658 commits are prefixed with <tt>-</tt>.
659 </p>
660 <div class="paragraph"><p>For example, if you have this topology:</p></div>
661 <div class="listingblock">
662 <div class="content">
663 <pre><tt> y---b---b branch B
664 / \ /
666 / / \
667 o---x---a---a branch A</tt></pre>
668 </div></div>
669 <div class="paragraph"><p>you would get an output like this:</p></div>
670 <div class="listingblock">
671 <div class="content">
672 <pre><tt> $ git rev-list --left-right --boundary --pretty=oneline A...B
674 &gt;bbbbbbb... 3rd on b
675 &gt;bbbbbbb... 2nd on b
676 &lt;aaaaaaa... 3rd on a
677 &lt;aaaaaaa... 2nd on a
678 -yyyyyyy... 1st on b
679 -xxxxxxx... 1st on a</tt></pre>
680 </div></div>
681 </dd>
682 <dt class="hdlist1">
683 --graph
684 </dt>
685 <dd>
687 Draw a text-based graphical representation of the commit history
688 on the left hand side of the output. This may cause extra lines
689 to be printed in between commits, in order for the graph history
690 to be drawn properly.
691 </p>
692 <div class="paragraph"><p>This enables parent rewriting, see <em>History Simplification</em> below.</p></div>
693 <div class="paragraph"><p>This implies the <em>--topo-order</em> option by default, but the
694 <em>--date-order</em> option may also be specified.</p></div>
695 </dd>
696 <dt class="hdlist1">
697 --count
698 </dt>
699 <dd>
701 Print a number stating how many commits would have been
702 listed, and suppress all other output. When used together
703 with <em>--left-right</em>, instead print the counts for left and
704 right commits, separated by a tab.
705 </p>
706 </dd>
707 </dl></div>
708 <h3 id="_commit_limiting">Commit Limiting</h3><div style="clear:left"></div>
709 <div class="paragraph"><p>Besides specifying a range of commits that should be listed using the
710 special notations explained in the description, additional commit
711 limiting may be applied.</p></div>
712 <div class="dlist"><dl>
713 <dt class="hdlist1">
714 -n <em>number</em>
715 </dt>
716 <dt class="hdlist1">
717 --max-count=&lt;number&gt;
718 </dt>
719 <dd>
721 Limit the number of commits output.
722 </p>
723 </dd>
724 <dt class="hdlist1">
725 --skip=&lt;number&gt;
726 </dt>
727 <dd>
729 Skip <em>number</em> commits before starting to show the commit output.
730 </p>
731 </dd>
732 <dt class="hdlist1">
733 --since=&lt;date&gt;
734 </dt>
735 <dt class="hdlist1">
736 --after=&lt;date&gt;
737 </dt>
738 <dd>
740 Show commits more recent than a specific date.
741 </p>
742 </dd>
743 <dt class="hdlist1">
744 --until=&lt;date&gt;
745 </dt>
746 <dt class="hdlist1">
747 --before=&lt;date&gt;
748 </dt>
749 <dd>
751 Show commits older than a specific date.
752 </p>
753 </dd>
754 <dt class="hdlist1">
755 --max-age=&lt;timestamp&gt;
756 </dt>
757 <dt class="hdlist1">
758 --min-age=&lt;timestamp&gt;
759 </dt>
760 <dd>
762 Limit the commits output to specified time range.
763 </p>
764 </dd>
765 <dt class="hdlist1">
766 --author=&lt;pattern&gt;
767 </dt>
768 <dt class="hdlist1">
769 --committer=&lt;pattern&gt;
770 </dt>
771 <dd>
773 Limit the commits output to ones with author/committer
774 header lines that match the specified pattern (regular expression).
775 </p>
776 </dd>
777 <dt class="hdlist1">
778 --grep=&lt;pattern&gt;
779 </dt>
780 <dd>
782 Limit the commits output to ones with log message that
783 matches the specified pattern (regular expression).
784 </p>
785 </dd>
786 <dt class="hdlist1">
787 --all-match
788 </dt>
789 <dd>
791 Limit the commits output to ones that match all given --grep,
792 --author and --committer instead of ones that match at least one.
793 </p>
794 </dd>
795 <dt class="hdlist1">
797 </dt>
798 <dt class="hdlist1">
799 --regexp-ignore-case
800 </dt>
801 <dd>
803 Match the regexp limiting patterns without regard to letters case.
804 </p>
805 </dd>
806 <dt class="hdlist1">
808 </dt>
809 <dt class="hdlist1">
810 --extended-regexp
811 </dt>
812 <dd>
814 Consider the limiting patterns to be extended regular expressions
815 instead of the default basic regular expressions.
816 </p>
817 </dd>
818 <dt class="hdlist1">
820 </dt>
821 <dt class="hdlist1">
822 --fixed-strings
823 </dt>
824 <dd>
826 Consider the limiting patterns to be fixed strings (don&#8217;t interpret
827 pattern as a regular expression).
828 </p>
829 </dd>
830 <dt class="hdlist1">
831 --remove-empty
832 </dt>
833 <dd>
835 Stop when a given path disappears from the tree.
836 </p>
837 </dd>
838 <dt class="hdlist1">
839 --merges
840 </dt>
841 <dd>
843 Print only merge commits.
844 </p>
845 </dd>
846 <dt class="hdlist1">
847 --no-merges
848 </dt>
849 <dd>
851 Do not print commits with more than one parent.
852 </p>
853 </dd>
854 <dt class="hdlist1">
855 --first-parent
856 </dt>
857 <dd>
859 Follow only the first parent commit upon seeing a merge
860 commit. This option can give a better overview when
861 viewing the evolution of a particular topic branch,
862 because merges into a topic branch tend to be only about
863 adjusting to updated upstream from time to time, and
864 this option allows you to ignore the individual commits
865 brought in to your history by such a merge.
866 </p>
867 </dd>
868 <dt class="hdlist1">
869 --not
870 </dt>
871 <dd>
873 Reverses the meaning of the <em>&#94;</em> prefix (or lack thereof)
874 for all following revision specifiers, up to the next <em>--not</em>.
875 </p>
876 </dd>
877 <dt class="hdlist1">
878 --all
879 </dt>
880 <dd>
882 Pretend as if all the refs in <tt>refs/</tt> are listed on the
883 command line as <em>&lt;commit&gt;</em>.
884 </p>
885 </dd>
886 <dt class="hdlist1">
887 --branches[=&lt;pattern&gt;]
888 </dt>
889 <dd>
891 Pretend as if all the refs in <tt>refs/heads</tt> are listed
892 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
893 branches to ones matching given shell glob. If pattern lacks <em>?</em>,
894 <em><strong></em>, or <em>[</em>, <em>/</strong></em> at the end is implied.
895 </p>
896 </dd>
897 <dt class="hdlist1">
898 --tags[=&lt;pattern&gt;]
899 </dt>
900 <dd>
902 Pretend as if all the refs in <tt>refs/tags</tt> are listed
903 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
904 tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em><strong></em>,
905 or <em>[</em>, <em>/</strong></em> at the end is implied.
906 </p>
907 </dd>
908 <dt class="hdlist1">
909 --remotes[=&lt;pattern&gt;]
910 </dt>
911 <dd>
913 Pretend as if all the refs in <tt>refs/remotes</tt> are listed
914 on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
915 remote-tracking branches to ones matching given shell glob.
916 If pattern lacks <em>?</em>, <em><strong></em>, or <em>[</em>, <em>/</strong></em> at the end is implied.
917 </p>
918 </dd>
919 <dt class="hdlist1">
920 --glob=&lt;glob-pattern&gt;
921 </dt>
922 <dd>
924 Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
925 are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
926 is automatically prepended if missing. If pattern lacks <em>?</em>, <em><strong></em>,
927 or <em>[</em>, <em>/</strong></em> at the end is implied.
928 </p>
929 </dd>
930 <dt class="hdlist1">
931 --stdin
932 </dt>
933 <dd>
935 In addition to the <em>&lt;commit&gt;</em> listed on the command
936 line, read them from the standard input. If a <em>--</em> separator is
937 seen, stop reading commits and start reading paths to limit the
938 result.
939 </p>
940 </dd>
941 <dt class="hdlist1">
942 --quiet
943 </dt>
944 <dd>
946 Don&#8217;t print anything to standard output. This form
947 is primarily meant to allow the caller to
948 test the exit status to see if a range of objects is fully
949 connected (or not). It is faster than redirecting stdout
950 to /dev/null as the output does not have to be formatted.
951 </p>
952 </dd>
953 <dt class="hdlist1">
954 --cherry-pick
955 </dt>
956 <dd>
958 Omit any commit that introduces the same change as
959 another commit on the "other side" when the set of
960 commits are limited with symmetric difference.
961 </p>
962 <div class="paragraph"><p>For example, if you have two branches, <tt>A</tt> and <tt>B</tt>, a usual way
963 to list all commits on only one side of them is with
964 <tt>--left-right</tt>, like the example above in the description of
965 that option. It however shows the commits that were cherry-picked
966 from the other branch (for example, "3rd on b" may be cherry-picked
967 from branch A). With this option, such pairs of commits are
968 excluded from the output.</p></div>
969 </dd>
970 <dt class="hdlist1">
972 </dt>
973 <dt class="hdlist1">
974 --walk-reflogs
975 </dt>
976 <dd>
978 Instead of walking the commit ancestry chain, walk
979 reflog entries from the most recent one to older ones.
980 When this option is used you cannot specify commits to
981 exclude (that is, <em>&#94;commit</em>, <em>commit1..commit2</em>,
982 nor <em>commit1...commit2</em> notations cannot be used).
983 </p>
984 <div class="paragraph"><p>With <em>--pretty</em> format other than oneline (for obvious reasons),
985 this causes the output to have two extra lines of information
986 taken from the reflog. By default, <em>commit@{Nth}</em> notation is
987 used in the output. When the starting commit is specified as
988 <em>commit@{now}</em>, output also uses <em>commit@{timestamp}</em> notation
989 instead. Under <em>--pretty=oneline</em>, the commit message is
990 prefixed with this information on the same line.
991 This option cannot be combined with <em>--reverse</em>.
992 See also <a href="git-reflog.html">git-reflog(1)</a>.</p></div>
993 </dd>
994 <dt class="hdlist1">
995 --merge
996 </dt>
997 <dd>
999 After a failed merge, show refs that touch files having a
1000 conflict and don&#8217;t exist on all heads to merge.
1001 </p>
1002 </dd>
1003 <dt class="hdlist1">
1004 --boundary
1005 </dt>
1006 <dd>
1008 Output uninteresting commits at the boundary, which are usually
1009 not shown.
1010 </p>
1011 </dd>
1012 </dl></div>
1013 <h3 id="_history_simplification">History Simplification</h3><div style="clear:left"></div>
1014 <div class="paragraph"><p>Sometimes you are only interested in parts of the history, for example the
1015 commits modifying a particular &lt;path&gt;. But there are two parts of
1016 <em>History Simplification</em>, one part is selecting the commits and the other
1017 is how to do it, as there are various strategies to simplify the history.</p></div>
1018 <div class="paragraph"><p>The following options select the commits to be shown:</p></div>
1019 <div class="dlist"><dl>
1020 <dt class="hdlist1">
1021 &lt;paths&gt;
1022 </dt>
1023 <dd>
1025 Commits modifying the given &lt;paths&gt; are selected.
1026 </p>
1027 </dd>
1028 <dt class="hdlist1">
1029 --simplify-by-decoration
1030 </dt>
1031 <dd>
1033 Commits that are referred by some branch or tag are selected.
1034 </p>
1035 </dd>
1036 </dl></div>
1037 <div class="paragraph"><p>Note that extra commits can be shown to give a meaningful history.</p></div>
1038 <div class="paragraph"><p>The following options affect the way the simplification is performed:</p></div>
1039 <div class="dlist"><dl>
1040 <dt class="hdlist1">
1041 Default mode
1042 </dt>
1043 <dd>
1045 Simplifies the history to the simplest history explaining the
1046 final state of the tree. Simplest because it prunes some side
1047 branches if the end result is the same (i.e. merging branches
1048 with the same content)
1049 </p>
1050 </dd>
1051 <dt class="hdlist1">
1052 --full-history
1053 </dt>
1054 <dd>
1056 As the default mode but does not prune some history.
1057 </p>
1058 </dd>
1059 <dt class="hdlist1">
1060 --dense
1061 </dt>
1062 <dd>
1064 Only the selected commits are shown, plus some to have a
1065 meaningful history.
1066 </p>
1067 </dd>
1068 <dt class="hdlist1">
1069 --sparse
1070 </dt>
1071 <dd>
1073 All commits in the simplified history are shown.
1074 </p>
1075 </dd>
1076 <dt class="hdlist1">
1077 --simplify-merges
1078 </dt>
1079 <dd>
1081 Additional option to <em>--full-history</em> to remove some needless
1082 merges from the resulting history, as there are no selected
1083 commits contributing to this merge.
1084 </p>
1085 </dd>
1086 <dt class="hdlist1">
1087 --ancestry-path
1088 </dt>
1089 <dd>
1091 When given a range of commits to display (e.g. <em>commit1..commit2</em>
1092 or <em>commit2 &#94;commit1</em>), only display commits that exist
1093 directly on the ancestry chain between the <em>commit1</em> and
1094 <em>commit2</em>, i.e. commits that are both descendants of <em>commit1</em>,
1095 and ancestors of <em>commit2</em>.
1096 </p>
1097 </dd>
1098 </dl></div>
1099 <div class="paragraph"><p>A more detailed explanation follows.</p></div>
1100 <div class="paragraph"><p>Suppose you specified <tt>foo</tt> as the &lt;paths&gt;. We shall call commits
1101 that modify <tt>foo</tt> !TREESAME, and the rest TREESAME. (In a diff
1102 filtered for <tt>foo</tt>, they look different and equal, respectively.)</p></div>
1103 <div class="paragraph"><p>In the following, we will always refer to the same example history to
1104 illustrate the differences between simplification settings. We assume
1105 that you are filtering for a file <tt>foo</tt> in this commit graph:</p></div>
1106 <div class="listingblock">
1107 <div class="content">
1108 <pre><tt> .-A---M---N---O---P
1109 / / / / /
1110 I B C D E
1111 \ / / / /
1112 `-------------'</tt></pre>
1113 </div></div>
1114 <div class="paragraph"><p>The horizontal line of history A&#8212;P is taken to be the first parent of
1115 each merge. The commits are:</p></div>
1116 <div class="ulist"><ul>
1117 <li>
1119 <tt>I</tt> is the initial commit, in which <tt>foo</tt> exists with contents
1120 "asdf", and a file <tt>quux</tt> exists with contents "quux". Initial
1121 commits are compared to an empty tree, so <tt>I</tt> is !TREESAME.
1122 </p>
1123 </li>
1124 <li>
1126 In <tt>A</tt>, <tt>foo</tt> contains just "foo".
1127 </p>
1128 </li>
1129 <li>
1131 <tt>B</tt> contains the same change as <tt>A</tt>. Its merge <tt>M</tt> is trivial and
1132 hence TREESAME to all parents.
1133 </p>
1134 </li>
1135 <li>
1137 <tt>C</tt> does not change <tt>foo</tt>, but its merge <tt>N</tt> changes it to "foobar",
1138 so it is not TREESAME to any parent.
1139 </p>
1140 </li>
1141 <li>
1143 <tt>D</tt> sets <tt>foo</tt> to "baz". Its merge <tt>O</tt> combines the strings from
1144 <tt>N</tt> and <tt>D</tt> to "foobarbaz"; i.e., it is not TREESAME to any parent.
1145 </p>
1146 </li>
1147 <li>
1149 <tt>E</tt> changes <tt>quux</tt> to "xyzzy", and its merge <tt>P</tt> combines the
1150 strings to "quux xyzzy". Despite appearing interesting, <tt>P</tt> is
1151 TREESAME to all parents.
1152 </p>
1153 </li>
1154 </ul></div>
1155 <div class="paragraph"><p><em>rev-list</em> walks backwards through history, including or excluding
1156 commits based on whether <em>--full-history</em> and/or parent rewriting
1157 (via <em>--parents</em> or <em>--children</em>) are used. The following settings
1158 are available.</p></div>
1159 <div class="dlist"><dl>
1160 <dt class="hdlist1">
1161 Default mode
1162 </dt>
1163 <dd>
1165 Commits are included if they are not TREESAME to any parent
1166 (though this can be changed, see <em>--sparse</em> below). If the
1167 commit was a merge, and it was TREESAME to one parent, follow
1168 only that parent. (Even if there are several TREESAME
1169 parents, follow only one of them.) Otherwise, follow all
1170 parents.
1171 </p>
1172 <div class="paragraph"><p>This results in:</p></div>
1173 <div class="listingblock">
1174 <div class="content">
1175 <pre><tt> .-A---N---O
1176 / / /
1177 I---------D</tt></pre>
1178 </div></div>
1179 <div class="paragraph"><p>Note how the rule to only follow the TREESAME parent, if one is
1180 available, removed <tt>B</tt> from consideration entirely. <tt>C</tt> was
1181 considered via <tt>N</tt>, but is TREESAME. Root commits are compared to an
1182 empty tree, so <tt>I</tt> is !TREESAME.</p></div>
1183 <div class="paragraph"><p>Parent/child relations are only visible with --parents, but that does
1184 not affect the commits selected in default mode, so we have shown the
1185 parent lines.</p></div>
1186 </dd>
1187 <dt class="hdlist1">
1188 --full-history without parent rewriting
1189 </dt>
1190 <dd>
1192 This mode differs from the default in one point: always follow
1193 all parents of a merge, even if it is TREESAME to one of them.
1194 Even if more than one side of the merge has commits that are
1195 included, this does not imply that the merge itself is! In
1196 the example, we get
1197 </p>
1198 <div class="listingblock">
1199 <div class="content">
1200 <pre><tt> I A B N D O</tt></pre>
1201 </div></div>
1202 <div class="paragraph"><p><tt>P</tt> and <tt>M</tt> were excluded because they are TREESAME to a parent. <tt>E</tt>,
1203 <tt>C</tt> and <tt>B</tt> were all walked, but only <tt>B</tt> was !TREESAME, so the others
1204 do not appear.</p></div>
1205 <div class="paragraph"><p>Note that without parent rewriting, it is not really possible to talk
1206 about the parent/child relationships between the commits, so we show
1207 them disconnected.</p></div>
1208 </dd>
1209 <dt class="hdlist1">
1210 --full-history with parent rewriting
1211 </dt>
1212 <dd>
1214 Ordinary commits are only included if they are !TREESAME
1215 (though this can be changed, see <em>--sparse</em> below).
1216 </p>
1217 <div class="paragraph"><p>Merges are always included. However, their parent list is rewritten:
1218 Along each parent, prune away commits that are not included
1219 themselves. This results in</p></div>
1220 <div class="listingblock">
1221 <div class="content">
1222 <pre><tt> .-A---M---N---O---P
1223 / / / / /
1224 I B / D /
1225 \ / / / /
1226 `-------------'</tt></pre>
1227 </div></div>
1228 <div class="paragraph"><p>Compare to <em>--full-history</em> without rewriting above. Note that <tt>E</tt>
1229 was pruned away because it is TREESAME, but the parent list of P was
1230 rewritten to contain <tt>E</tt>'s parent <tt>I</tt>. The same happened for <tt>C</tt> and
1231 <tt>N</tt>. Note also that <tt>P</tt> was included despite being TREESAME.</p></div>
1232 </dd>
1233 </dl></div>
1234 <div class="paragraph"><p>In addition to the above settings, you can change whether TREESAME
1235 affects inclusion:</p></div>
1236 <div class="dlist"><dl>
1237 <dt class="hdlist1">
1238 --dense
1239 </dt>
1240 <dd>
1242 Commits that are walked are included if they are not TREESAME
1243 to any parent.
1244 </p>
1245 </dd>
1246 <dt class="hdlist1">
1247 --sparse
1248 </dt>
1249 <dd>
1251 All commits that are walked are included.
1252 </p>
1253 <div class="paragraph"><p>Note that without <em>--full-history</em>, this still simplifies merges: if
1254 one of the parents is TREESAME, we follow only that one, so the other
1255 sides of the merge are never walked.</p></div>
1256 </dd>
1257 <dt class="hdlist1">
1258 --simplify-merges
1259 </dt>
1260 <dd>
1262 First, build a history graph in the same way that
1263 <em>--full-history</em> with parent rewriting does (see above).
1264 </p>
1265 <div class="paragraph"><p>Then simplify each commit &#8216;C` to its replacement <tt>C&#8217;</tt> in the final
1266 history according to the following rules:</p></div>
1267 <div class="ulist"><ul>
1268 <li>
1270 Set &#8216;C&#8217;` to <tt>C</tt>.
1271 </p>
1272 </li>
1273 <li>
1275 Replace each parent &#8216;P` of <tt>C&#8217;</tt> with its simplification &#8216;P&#8217;`. In
1276 the process, drop parents that are ancestors of other parents, and
1277 remove duplicates.
1278 </p>
1279 </li>
1280 <li>
1282 If after this parent rewriting, &#8216;C&#8217;` is a root or merge commit (has
1283 zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1284 Otherwise, it is replaced with its only parent.
1285 </p>
1286 </li>
1287 </ul></div>
1288 <div class="paragraph"><p>The effect of this is best shown by way of comparing to
1289 <em>--full-history</em> with parent rewriting. The example turns into:</p></div>
1290 <div class="listingblock">
1291 <div class="content">
1292 <pre><tt> .-A---M---N---O
1293 / / /
1294 I B D
1295 \ / /
1296 `---------'</tt></pre>
1297 </div></div>
1298 <div class="paragraph"><p>Note the major differences in <tt>N</tt> and <tt>P</tt> over <em>--full-history</em>:</p></div>
1299 <div class="ulist"><ul>
1300 <li>
1302 <tt>N</tt>'s parent list had <tt>I</tt> removed, because it is an ancestor of the
1303 other parent <tt>M</tt>. Still, <tt>N</tt> remained because it is !TREESAME.
1304 </p>
1305 </li>
1306 <li>
1308 <tt>P</tt>'s parent list similarly had <tt>I</tt> removed. <tt>P</tt> was then
1309 removed completely, because it had one parent and is TREESAME.
1310 </p>
1311 </li>
1312 </ul></div>
1313 </dd>
1314 </dl></div>
1315 <div class="paragraph"><p>Finally, there is a fifth simplification mode available:</p></div>
1316 <div class="dlist"><dl>
1317 <dt class="hdlist1">
1318 --ancestry-path
1319 </dt>
1320 <dd>
1322 Limit the displayed commits to those directly on the ancestry
1323 chain between the "from" and "to" commits in the given commit
1324 range. I.e. only display commits that are ancestor of the "to"
1325 commit, and descendants of the "from" commit.
1326 </p>
1327 <div class="paragraph"><p>As an example use case, consider the following commit history:</p></div>
1328 <div class="listingblock">
1329 <div class="content">
1330 <pre><tt> D---E-------F
1331 / \ \
1332 B---C---G---H---I---J
1334 A-------K---------------L--M</tt></pre>
1335 </div></div>
1336 <div class="paragraph"><p>A regular <em>D..M</em> computes the set of commits that are ancestors of <tt>M</tt>,
1337 but excludes the ones that are ancestors of <tt>D</tt>. This is useful to see
1338 what happened to the history leading to <tt>M</tt> since <tt>D</tt>, in the sense
1339 that "what does <tt>M</tt> have that did not exist in <tt>D</tt>". The result in this
1340 example would be all the commits, except <tt>A</tt> and <tt>B</tt> (and <tt>D</tt> itself,
1341 of course).</p></div>
1342 <div class="paragraph"><p>When we want to find out what commits in <tt>M</tt> are contaminated with the
1343 bug introduced by <tt>D</tt> and need fixing, however, we might want to view
1344 only the subset of <em>D..M</em> that are actually descendants of <tt>D</tt>, i.e.
1345 excluding <tt>C</tt> and <tt>K</tt>. This is exactly what the <em>--ancestry-path</em>
1346 option does. Applied to the <em>D..M</em> range, it results in:</p></div>
1347 <div class="listingblock">
1348 <div class="content">
1349 <pre><tt> E-------F
1351 G---H---I---J
1353 L--M</tt></pre>
1354 </div></div>
1355 </dd>
1356 </dl></div>
1357 <div class="paragraph"><p>The <em>--simplify-by-decoration</em> option allows you to view only the
1358 big picture of the topology of the history, by omitting commits
1359 that are not referenced by tags. Commits are marked as !TREESAME
1360 (in other words, kept after history simplification rules described
1361 above) if (1) they are referenced by tags, or (2) they change the
1362 contents of the paths given on the command line. All other
1363 commits are marked as TREESAME (subject to be simplified away).</p></div>
1364 <h3 id="_bisection_helpers">Bisection Helpers</h3><div style="clear:left"></div>
1365 <div class="dlist"><dl>
1366 <dt class="hdlist1">
1367 --bisect
1368 </dt>
1369 <dd>
1371 Limit output to the one commit object which is roughly halfway between
1372 included and excluded commits. Note that the bad bisection ref
1373 <tt>refs/bisect/bad</tt> is added to the included commits (if it
1374 exists) and the good bisection refs <tt>refs/bisect/good-*</tt> are
1375 added to the excluded commits (if they exist). Thus, supposing there
1376 are no refs in <tt>refs/bisect/</tt>, if
1377 </p>
1378 </dd>
1379 </dl></div>
1380 <div class="listingblock">
1381 <div class="content">
1382 <pre><tt> $ git rev-list --bisect foo ^bar ^baz</tt></pre>
1383 </div></div>
1384 <div class="paragraph"><p>outputs <em>midpoint</em>, the output of the two commands</p></div>
1385 <div class="listingblock">
1386 <div class="content">
1387 <pre><tt> $ git rev-list foo ^midpoint
1388 $ git rev-list midpoint ^bar ^baz</tt></pre>
1389 </div></div>
1390 <div class="paragraph"><p>would be of roughly the same length. Finding the change which
1391 introduces a regression is thus reduced to a binary search: repeatedly
1392 generate and test new 'midpoint&#8217;s until the commit chain is of length
1393 one.</p></div>
1394 <div class="dlist"><dl>
1395 <dt class="hdlist1">
1396 --bisect-vars
1397 </dt>
1398 <dd>
1400 This calculates the same as <tt>--bisect</tt>, except that refs in
1401 <tt>refs/bisect/</tt> are not used, and except that this outputs
1402 text ready to be eval&#8217;ed by the shell. These lines will assign the
1403 name of the midpoint revision to the variable <tt>bisect_rev</tt>, and the
1404 expected number of commits to be tested after <tt>bisect_rev</tt> is tested
1405 to <tt>bisect_nr</tt>, the expected number of commits to be tested if
1406 <tt>bisect_rev</tt> turns out to be good to <tt>bisect_good</tt>, the expected
1407 number of commits to be tested if <tt>bisect_rev</tt> turns out to be bad to
1408 <tt>bisect_bad</tt>, and the number of commits we are bisecting right now to
1409 <tt>bisect_all</tt>.
1410 </p>
1411 </dd>
1412 <dt class="hdlist1">
1413 --bisect-all
1414 </dt>
1415 <dd>
1417 This outputs all the commit objects between the included and excluded
1418 commits, ordered by their distance to the included and excluded
1419 commits. Refs in <tt>refs/bisect/</tt> are not used. The farthest
1420 from them is displayed first. (This is the only one displayed by
1421 <tt>--bisect</tt>.)
1422 </p>
1423 <div class="paragraph"><p>This is useful because it makes it easy to choose a good commit to
1424 test when you want to avoid to test some of them for some reason (they
1425 may not compile for example).</p></div>
1426 <div class="paragraph"><p>This option can be used along with <tt>--bisect-vars</tt>, in this case,
1427 after all the sorted commit objects, there will be the same text as if
1428 <tt>--bisect-vars</tt> had been used alone.</p></div>
1429 </dd>
1430 </dl></div>
1431 <h3 id="_commit_ordering">Commit Ordering</h3><div style="clear:left"></div>
1432 <div class="paragraph"><p>By default, the commits are shown in reverse chronological order.</p></div>
1433 <div class="dlist"><dl>
1434 <dt class="hdlist1">
1435 --topo-order
1436 </dt>
1437 <dd>
1439 This option makes them appear in topological order (i.e.
1440 descendant commits are shown before their parents).
1441 </p>
1442 </dd>
1443 <dt class="hdlist1">
1444 --date-order
1445 </dt>
1446 <dd>
1448 This option is similar to <em>--topo-order</em> in the sense that no
1449 parent comes before all of its children, but otherwise things
1450 are still ordered in the commit timestamp order.
1451 </p>
1452 </dd>
1453 <dt class="hdlist1">
1454 --reverse
1455 </dt>
1456 <dd>
1458 Output the commits in reverse order.
1459 Cannot be combined with <em>--walk-reflogs</em>.
1460 </p>
1461 </dd>
1462 </dl></div>
1463 <h3 id="_object_traversal">Object Traversal</h3><div style="clear:left"></div>
1464 <div class="paragraph"><p>These options are mostly targeted for packing of git repositories.</p></div>
1465 <div class="dlist"><dl>
1466 <dt class="hdlist1">
1467 --objects
1468 </dt>
1469 <dd>
1471 Print the object IDs of any object referenced by the listed
1472 commits. <em>--objects foo ^bar</em> thus means "send me
1473 all object IDs which I need to download if I have the commit
1474 object <em>bar</em>, but not <em>foo</em>".
1475 </p>
1476 </dd>
1477 <dt class="hdlist1">
1478 --objects-edge
1479 </dt>
1480 <dd>
1482 Similar to <em>--objects</em>, but also print the IDs of excluded
1483 commits prefixed with a "-" character. This is used by
1484 <a href="git-pack-objects.html">git-pack-objects(1)</a> to build "thin" pack, which records
1485 objects in deltified form based on objects contained in these
1486 excluded commits to reduce network traffic.
1487 </p>
1488 </dd>
1489 <dt class="hdlist1">
1490 --unpacked
1491 </dt>
1492 <dd>
1494 Only useful with <em>--objects</em>; print the object IDs that are not
1495 in packs.
1496 </p>
1497 </dd>
1498 <dt class="hdlist1">
1499 --no-walk
1500 </dt>
1501 <dd>
1503 Only show the given revs, but do not traverse their ancestors.
1504 </p>
1505 </dd>
1506 <dt class="hdlist1">
1507 --do-walk
1508 </dt>
1509 <dd>
1511 Overrides a previous --no-walk.
1512 </p>
1513 </dd>
1514 </dl></div>
1515 </div>
1516 <h2 id="_pretty_formats">PRETTY FORMATS</h2>
1517 <div class="sectionbody">
1518 <div class="paragraph"><p>If the commit is a merge, and if the pretty-format
1519 is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
1520 inserted before the <em>Author:</em> line. This line begins with
1521 "Merge: " and the sha1s of ancestral commits are printed,
1522 separated by spaces. Note that the listed commits may not
1523 necessarily be the list of the <strong>direct</strong> parent commits if you
1524 have limited your view of history: for example, if you are
1525 only interested in changes related to a certain directory or
1526 file.</p></div>
1527 <div class="paragraph"><p>There are several built-in formats, and you can define
1528 additional formats by setting a pretty.&lt;name&gt;
1529 config option to either another format name, or a
1530 <em>format:</em> string, as described below (see
1531 <a href="git-config.html">git-config(1)</a>). Here are the details of the
1532 built-in formats:</p></div>
1533 <div class="ulist"><ul>
1534 <li>
1536 <em>oneline</em>
1537 </p>
1538 <div class="literalblock">
1539 <div class="content">
1540 <pre><tt>&lt;sha1&gt; &lt;title line&gt;</tt></pre>
1541 </div></div>
1542 <div class="paragraph"><p>This is designed to be as compact as possible.</p></div>
1543 </li>
1544 <li>
1546 <em>short</em>
1547 </p>
1548 <div class="literalblock">
1549 <div class="content">
1550 <pre><tt>commit &lt;sha1&gt;
1551 Author: &lt;author&gt;</tt></pre>
1552 </div></div>
1553 <div class="literalblock">
1554 <div class="content">
1555 <pre><tt>&lt;title line&gt;</tt></pre>
1556 </div></div>
1557 </li>
1558 <li>
1560 <em>medium</em>
1561 </p>
1562 <div class="literalblock">
1563 <div class="content">
1564 <pre><tt>commit &lt;sha1&gt;
1565 Author: &lt;author&gt;
1566 Date: &lt;author date&gt;</tt></pre>
1567 </div></div>
1568 <div class="literalblock">
1569 <div class="content">
1570 <pre><tt>&lt;title line&gt;</tt></pre>
1571 </div></div>
1572 <div class="literalblock">
1573 <div class="content">
1574 <pre><tt>&lt;full commit message&gt;</tt></pre>
1575 </div></div>
1576 </li>
1577 <li>
1579 <em>full</em>
1580 </p>
1581 <div class="literalblock">
1582 <div class="content">
1583 <pre><tt>commit &lt;sha1&gt;
1584 Author: &lt;author&gt;
1585 Commit: &lt;committer&gt;</tt></pre>
1586 </div></div>
1587 <div class="literalblock">
1588 <div class="content">
1589 <pre><tt>&lt;title line&gt;</tt></pre>
1590 </div></div>
1591 <div class="literalblock">
1592 <div class="content">
1593 <pre><tt>&lt;full commit message&gt;</tt></pre>
1594 </div></div>
1595 </li>
1596 <li>
1598 <em>fuller</em>
1599 </p>
1600 <div class="literalblock">
1601 <div class="content">
1602 <pre><tt>commit &lt;sha1&gt;
1603 Author: &lt;author&gt;
1604 AuthorDate: &lt;author date&gt;
1605 Commit: &lt;committer&gt;
1606 CommitDate: &lt;committer date&gt;</tt></pre>
1607 </div></div>
1608 <div class="literalblock">
1609 <div class="content">
1610 <pre><tt>&lt;title line&gt;</tt></pre>
1611 </div></div>
1612 <div class="literalblock">
1613 <div class="content">
1614 <pre><tt>&lt;full commit message&gt;</tt></pre>
1615 </div></div>
1616 </li>
1617 <li>
1619 <em>email</em>
1620 </p>
1621 <div class="literalblock">
1622 <div class="content">
1623 <pre><tt>From &lt;sha1&gt; &lt;date&gt;
1624 From: &lt;author&gt;
1625 Date: &lt;author date&gt;
1626 Subject: [PATCH] &lt;title line&gt;</tt></pre>
1627 </div></div>
1628 <div class="literalblock">
1629 <div class="content">
1630 <pre><tt>&lt;full commit message&gt;</tt></pre>
1631 </div></div>
1632 </li>
1633 <li>
1635 <em>raw</em>
1636 </p>
1637 <div class="paragraph"><p>The <em>raw</em> format shows the entire commit exactly as
1638 stored in the commit object. Notably, the SHA1s are
1639 displayed in full, regardless of whether --abbrev or
1640 --no-abbrev are used, and <em>parents</em> information show the
1641 true parent commits, without taking grafts nor history
1642 simplification into account.</p></div>
1643 </li>
1644 <li>
1646 <em>format:&lt;string&gt;</em>
1647 </p>
1648 <div class="paragraph"><p>The <em>format:&lt;string&gt;</em> format allows you to specify which information
1649 you want to show. It works a little bit like printf format,
1650 with the notable exception that you get a newline with <em>%n</em>
1651 instead of <em>\n</em>.</p></div>
1652 <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>
1653 would show something like this:</p></div>
1654 <div class="listingblock">
1655 <div class="content">
1656 <pre><tt>The author of fe6e0ee was Junio C Hamano, 23 hours ago
1657 The title was &gt;&gt;t4119: test autocomputing -p&lt;n&gt; for traditional diff input.&lt;&lt;</tt></pre>
1658 </div></div>
1659 <div class="paragraph"><p>The placeholders are:</p></div>
1660 <div class="ulist"><ul>
1661 <li>
1663 <em>%H</em>: commit hash
1664 </p>
1665 </li>
1666 <li>
1668 <em>%h</em>: abbreviated commit hash
1669 </p>
1670 </li>
1671 <li>
1673 <em>%T</em>: tree hash
1674 </p>
1675 </li>
1676 <li>
1678 <em>%t</em>: abbreviated tree hash
1679 </p>
1680 </li>
1681 <li>
1683 <em>%P</em>: parent hashes
1684 </p>
1685 </li>
1686 <li>
1688 <em>%p</em>: abbreviated parent hashes
1689 </p>
1690 </li>
1691 <li>
1693 <em>%an</em>: author name
1694 </p>
1695 </li>
1696 <li>
1698 <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>)
1699 </p>
1700 </li>
1701 <li>
1703 <em>%ae</em>: author email
1704 </p>
1705 </li>
1706 <li>
1708 <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>)
1709 </p>
1710 </li>
1711 <li>
1713 <em>%ad</em>: author date (format respects --date= option)
1714 </p>
1715 </li>
1716 <li>
1718 <em>%aD</em>: author date, RFC2822 style
1719 </p>
1720 </li>
1721 <li>
1723 <em>%ar</em>: author date, relative
1724 </p>
1725 </li>
1726 <li>
1728 <em>%at</em>: author date, UNIX timestamp
1729 </p>
1730 </li>
1731 <li>
1733 <em>%ai</em>: author date, ISO 8601 format
1734 </p>
1735 </li>
1736 <li>
1738 <em>%cn</em>: committer name
1739 </p>
1740 </li>
1741 <li>
1743 <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>)
1744 </p>
1745 </li>
1746 <li>
1748 <em>%ce</em>: committer email
1749 </p>
1750 </li>
1751 <li>
1753 <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>)
1754 </p>
1755 </li>
1756 <li>
1758 <em>%cd</em>: committer date
1759 </p>
1760 </li>
1761 <li>
1763 <em>%cD</em>: committer date, RFC2822 style
1764 </p>
1765 </li>
1766 <li>
1768 <em>%cr</em>: committer date, relative
1769 </p>
1770 </li>
1771 <li>
1773 <em>%ct</em>: committer date, UNIX timestamp
1774 </p>
1775 </li>
1776 <li>
1778 <em>%ci</em>: committer date, ISO 8601 format
1779 </p>
1780 </li>
1781 <li>
1783 <em>%d</em>: ref names, like the --decorate option of <a href="git-log.html">git-log(1)</a>
1784 </p>
1785 </li>
1786 <li>
1788 <em>%e</em>: encoding
1789 </p>
1790 </li>
1791 <li>
1793 <em>%s</em>: subject
1794 </p>
1795 </li>
1796 <li>
1798 <em>%f</em>: sanitized subject line, suitable for a filename
1799 </p>
1800 </li>
1801 <li>
1803 <em>%b</em>: body
1804 </p>
1805 </li>
1806 <li>
1808 <em>%B</em>: raw body (unwrapped subject and body)
1809 </p>
1810 </li>
1811 <li>
1813 <em>%N</em>: commit notes
1814 </p>
1815 </li>
1816 <li>
1818 <em>%gD</em>: reflog selector, e.g., <tt>refs/stash@{1}</tt>
1819 </p>
1820 </li>
1821 <li>
1823 <em>%gd</em>: shortened reflog selector, e.g., <tt>stash@{1}</tt>
1824 </p>
1825 </li>
1826 <li>
1828 <em>%gs</em>: reflog subject
1829 </p>
1830 </li>
1831 <li>
1833 <em>%Cred</em>: switch color to red
1834 </p>
1835 </li>
1836 <li>
1838 <em>%Cgreen</em>: switch color to green
1839 </p>
1840 </li>
1841 <li>
1843 <em>%Cblue</em>: switch color to blue
1844 </p>
1845 </li>
1846 <li>
1848 <em>%Creset</em>: reset color
1849 </p>
1850 </li>
1851 <li>
1853 <em>%C(&#8230;)</em>: color specification, as described in color.branch.* config option
1854 </p>
1855 </li>
1856 <li>
1858 <em>%m</em>: left, right or boundary mark
1859 </p>
1860 </li>
1861 <li>
1863 <em>%n</em>: newline
1864 </p>
1865 </li>
1866 <li>
1868 <em>%%</em>: a raw <em>%</em>
1869 </p>
1870 </li>
1871 <li>
1873 <em>%x00</em>: print a byte from a hex code
1874 </p>
1875 </li>
1876 <li>
1878 <em>%w([&lt;w&gt;[,&lt;i1&gt;[,&lt;i2&gt;]]])</em>: switch line wrapping, like the -w option of
1879 <a href="git-shortlog.html">git-shortlog(1)</a>.
1880 </p>
1881 </li>
1882 </ul></div>
1883 </li>
1884 </ul></div>
1885 <div class="admonitionblock">
1886 <table><tr>
1887 <td class="icon">
1888 <div class="title">Note</div>
1889 </td>
1890 <td class="content">Some placeholders may depend on other options given to the
1891 revision traversal engine. For example, the <tt>%g*</tt> reflog options will
1892 insert an empty string unless we are traversing reflog entries (e.g., by
1893 <tt>git log -g</tt>). The <tt>%d</tt> placeholder will use the "short" decoration
1894 format if <tt>--decorate</tt> was not already provided on the command line.</td>
1895 </tr></table>
1896 </div>
1897 <div class="paragraph"><p>If you add a <tt>&#43;</tt> (plus sign) after <em>%</em> of a placeholder, a line-feed
1898 is inserted immediately before the expansion if and only if the
1899 placeholder expands to a non-empty string.</p></div>
1900 <div class="paragraph"><p>If you add a <tt>-</tt> (minus sign) after <em>%</em> of a placeholder, line-feeds that
1901 immediately precede the expansion are deleted if and only if the
1902 placeholder expands to an empty string.</p></div>
1903 <div class="paragraph"><p>If you add a ` ` (space) after <em>%</em> of a placeholder, a space
1904 is inserted immediately before the expansion if and only if the
1905 placeholder expands to a non-empty string.</p></div>
1906 <div class="ulist"><ul>
1907 <li>
1909 <em>tformat:</em>
1910 </p>
1911 <div class="paragraph"><p>The <em>tformat:</em> format works exactly like <em>format:</em>, except that it
1912 provides "terminator" semantics instead of "separator" semantics. In
1913 other words, each commit has the message terminator character (usually a
1914 newline) appended, rather than a separator placed between entries.
1915 This means that the final entry of a single-line format will be properly
1916 terminated with a new line, just as the "oneline" format does.
1917 For example:</p></div>
1918 <div class="listingblock">
1919 <div class="content">
1920 <pre><tt>$ git log -2 --pretty=format:%h 4da45bef \
1921 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
1922 4da45be
1923 7134973 -- NO NEWLINE
1925 $ git log -2 --pretty=tformat:%h 4da45bef \
1926 | perl -pe '$_ .= " -- NO NEWLINE\n" unless /\n/'
1927 4da45be
1928 7134973</tt></pre>
1929 </div></div>
1930 <div class="paragraph"><p>In addition, any unrecognized string that has a <tt>%</tt> in it is interpreted
1931 as if it has <tt>tformat:</tt> in front of it. For example, these two are
1932 equivalent:</p></div>
1933 <div class="listingblock">
1934 <div class="content">
1935 <pre><tt>$ git log -2 --pretty=tformat:%h 4da45bef
1936 $ git log -2 --pretty=%h 4da45bef</tt></pre>
1937 </div></div>
1938 </li>
1939 </ul></div>
1940 </div>
1941 <h2 id="_author">Author</h2>
1942 <div class="sectionbody">
1943 <div class="paragraph"><p>Written by Linus Torvalds &lt;<a href="mailto:torvalds@osdl.org">torvalds@osdl.org</a>&gt;</p></div>
1944 </div>
1945 <h2 id="_documentation">Documentation</h2>
1946 <div class="sectionbody">
1947 <div class="paragraph"><p>Documentation by David Greaves, Junio C Hamano, Jonas Fonseca
1948 and the git-list &lt;<a href="mailto:git@vger.kernel.org">git@vger.kernel.org</a>&gt;.</p></div>
1949 </div>
1950 <h2 id="_git">GIT</h2>
1951 <div class="sectionbody">
1952 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
1953 </div>
1954 <div id="footer">
1955 <div id="footer-text">
1956 Last updated 2010-11-06 00:41:57 UTC
1957 </div>
1958 </div>
1959 </body>
1960 </html>