blob: a6e21d0b17c08efd2ae964ced47917e5a4da3e3c [file] [log] [blame]
Junio C Hamanob96f40a2024-08-01 00:57:251<!DOCTYPE html>
2<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3<head>
4<meta charset="UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
6<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
Junio C Hamanod6a33e42025-02-18 23:45:117<meta name="generator" content="Asciidoctor 2.0.23"/>
Junio C Hamanob96f40a2024-08-01 00:57:258<title>git-replay(1)</title>
9<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"/>
10<style>
11/*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
12/* Uncomment the following line when using as a custom stylesheet */
13/* @import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"; */
14html{font-family:sans-serif;-webkit-text-size-adjust:100%}
15a{background:none}
16a:focus{outline:thin dotted}
17a:active,a:hover{outline:0}
18h1{font-size:2em;margin:.67em 0}
19b,strong{font-weight:bold}
20abbr{font-size:.9em}
21abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
22dfn{font-style:italic}
23hr{height:0}
24mark{background:#ff0;color:#000}
25code,kbd,pre,samp{font-family:monospace;font-size:1em}
26pre{white-space:pre-wrap}
27q{quotes:"\201C" "\201D" "\2018" "\2019"}
28small{font-size:80%}
29sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
30sup{top:-.5em}
31sub{bottom:-.25em}
32img{border:0}
33svg:not(:root){overflow:hidden}
34figure{margin:0}
35audio,video{display:inline-block}
36audio:not([controls]){display:none;height:0}
37fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
38legend{border:0;padding:0}
39button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
40button,input{line-height:normal}
41button,select{text-transform:none}
42button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
43button[disabled],html input[disabled]{cursor:default}
44input[type=checkbox],input[type=radio]{padding:0}
45button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
46textarea{overflow:auto;vertical-align:top}
47table{border-collapse:collapse;border-spacing:0}
48*,::before,::after{box-sizing:border-box}
49html,body{font-size:100%}
50body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;line-height:1;position:relative;cursor:auto;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
51a:hover{cursor:pointer}
52img,object,embed{max-width:100%;height:auto}
53object,embed{height:100%}
54img{-ms-interpolation-mode:bicubic}
55.left{float:left!important}
56.right{float:right!important}
57.text-left{text-align:left!important}
58.text-right{text-align:right!important}
59.text-center{text-align:center!important}
60.text-justify{text-align:justify!important}
61.hide{display:none}
62img,object,svg{display:inline-block;vertical-align:middle}
63textarea{height:auto;min-height:50px}
64select{width:100%}
65.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
66div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
67a{color:#2156a5;text-decoration:underline;line-height:inherit}
68a:hover,a:focus{color:#1d4b8f}
69a img{border:0}
70p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
71p aside{font-size:.875em;line-height:1.35;font-style:italic}
72h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
73h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
74h1{font-size:2.125em}
75h2{font-size:1.6875em}
76h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
77h4,h5{font-size:1.125em}
78h6{font-size:1em}
79hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
80em,i{font-style:italic;line-height:inherit}
81strong,b{font-weight:bold;line-height:inherit}
82small{font-size:60%;line-height:inherit}
83code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
84ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
85ul,ol{margin-left:1.5em}
86ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
87ul.circle{list-style-type:circle}
88ul.disc{list-style-type:disc}
89ul.square{list-style-type:square}
90ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
91ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
92dl dt{margin-bottom:.3125em;font-weight:bold}
93dl dd{margin-bottom:1.25em}
94blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
95blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
96@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
97h1{font-size:2.75em}
98h2{font-size:2.3125em}
99h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
100h4{font-size:1.4375em}}
101table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
102table thead,table tfoot{background:#f7f8f7}
103table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
104table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
105table tr.even,table tr.alt{background:#f8f8f7}
106table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
107h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
108h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
109.center{margin-left:auto;margin-right:auto}
110.stretch{width:100%}
111.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
112.clearfix::after,.float-group::after{clear:both}
113:not(pre).nobreak{word-wrap:normal}
114:not(pre).nowrap{white-space:nowrap}
115:not(pre).pre-wrap{white-space:pre-wrap}
116:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
117pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
118pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
119pre>code{display:block}
120pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
121em em{font-style:normal}
122strong strong{font-weight:400}
123.keyseq{color:rgba(51,51,51,.8)}
124kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 .1em #fff;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
125.keyseq kbd:first-child{margin-left:0}
126.keyseq kbd:last-child{margin-right:0}
127.menuseq,.menuref{color:#000}
128.menuseq b:not(.caret),.menuref{font-weight:inherit}
129.menuseq{word-spacing:-.02em}
130.menuseq b.caret{font-size:1.25em;line-height:.8}
131.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
132b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
133b.button::before{content:"[";padding:0 3px 0 2px}
134b.button::after{content:"]";padding:0 2px 0 3px}
135p a>code:hover{color:rgba(0,0,0,.9)}
136#header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
137#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
138#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
139#content{margin-top:1.25em}
140#content::before{content:none}
141#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
142#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
Junio C Hamanod6a33e42025-02-18 23:45:11143#header>h1:only-child{border-bottom:1px solid #dddddf;padding-bottom:8px}
Junio C Hamanob96f40a2024-08-01 00:57:25144#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
145#header .details span:first-child{margin-left:-.125em}
146#header .details span.email a{color:rgba(0,0,0,.85)}
147#header .details br{display:none}
148#header .details br+span::before{content:"\00a0\2013\00a0"}
149#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
150#header .details br+span#revremark::before{content:"\00a0|\00a0"}
151#header #revnumber{text-transform:capitalize}
152#header #revnumber::after{content:"\00a0"}
153#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
154#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
155#toc>ul{margin-left:.125em}
156#toc ul.sectlevel0>li>a{font-style:italic}
157#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
158#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
159#toc li{line-height:1.3334;margin-top:.3334em}
160#toc a{text-decoration:none}
161#toc a:active{text-decoration:underline}
162#toctitle{color:#7a2518;font-size:1.2em}
163@media screen and (min-width:768px){#toctitle{font-size:1.375em}
164body.toc2{padding-left:15em;padding-right:0}
Junio C Hamanod6a33e42025-02-18 23:45:11165body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
Junio C Hamanob96f40a2024-08-01 00:57:25166#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
167#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
168#toc.toc2>ul{font-size:.9em;margin-bottom:0}
169#toc.toc2 ul ul{margin-left:0;padding-left:1em}
170#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
171body.toc2.toc-right{padding-left:0;padding-right:15em}
172body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
173@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
174#toc.toc2{width:20em}
175#toc.toc2 #toctitle{font-size:1.375em}
176#toc.toc2>ul{font-size:.95em}
177#toc.toc2 ul ul{padding-left:1.25em}
178body.toc2.toc-right{padding-left:0;padding-right:20em}}
179#content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
180#content #toc>:first-child{margin-top:0}
181#content #toc>:last-child{margin-bottom:0}
182#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
183#footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
184#content{margin-bottom:.625em}
185.sect1{padding-bottom:.625em}
186@media screen and (min-width:768px){#content{margin-bottom:1.25em}
187.sect1{padding-bottom:1.25em}}
188.sect1:last-child{padding-bottom:0}
189.sect1+.sect1{border-top:1px solid #e7e7e9}
190#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
191#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
192#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
193#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
194#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
195details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
196details{margin-left:1.25rem}
197details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
198details>summary::-webkit-details-marker{display:none}
199details>summary::before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1.25rem;transform:translateX(15%)}
200details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
201details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
202.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
203table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
204.paragraph.lead>p,#preamble>.sectionbody>[class=paragraph]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
205.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
206.admonitionblock>table td.icon{text-align:center;width:80px}
207.admonitionblock>table td.icon img{max-width:none}
208.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
209.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
210.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
211.exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
212.sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
213.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
214.exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
215.exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
216.literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
217@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
218@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
219.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
220.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
221.listingblock>.content{position:relative}
222.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
223.listingblock:hover code[data-lang]::before{display:block}
224.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
225.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
226.listingblock pre.highlightjs{padding:0}
227.listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
228.listingblock pre.prettyprint{border-width:0}
229.prettyprint{background:#f7f7f8}
230pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
231pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
232pre.prettyprint li code[data-lang]::before{opacity:1}
233pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
234table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
235table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
236table.linenotable td.code{padding-left:.75em}
237table.linenotable td.linenos,pre.pygments .linenos{border-right:1px solid;opacity:.35;padding-right:.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
238pre.pygments span.linenos{display:inline-block;margin-right:.75em}
239.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
240.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
241.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
242.quoteblock blockquote{margin:0;padding:0;border:0}
243.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
244.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
245.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
246.verseblock{margin:0 1em 1.25em}
247.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans-serif;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
248.verseblock pre strong{font-weight:400}
249.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
250.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
251.quoteblock .attribution br,.verseblock .attribution br{display:none}
252.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
253.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
254.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
255.quoteblock.abstract{margin:0 1em 1.25em;display:block}
256.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
257.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
258.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
259.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
260.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
261p.tableblock:last-child{margin-bottom:0}
262td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
263td.tableblock>.content>:last-child{margin-bottom:-1.25em}
264table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
265table.grid-all>*>tr>*{border-width:1px}
266table.grid-cols>*>tr>*{border-width:0 1px}
267table.grid-rows>*>tr>*{border-width:1px 0}
268table.frame-all{border-width:1px}
269table.frame-ends{border-width:1px 0}
270table.frame-sides{border-width:0 1px}
271table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
272table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
273table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
274table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
275table.stripes-all>*>tr,table.stripes-odd>*>tr:nth-of-type(odd),table.stripes-even>*>tr:nth-of-type(even),table.stripes-hover>*>tr:hover{background:#f8f8f7}
276th.halign-left,td.halign-left{text-align:left}
277th.halign-right,td.halign-right{text-align:right}
278th.halign-center,td.halign-center{text-align:center}
279th.valign-top,td.valign-top{vertical-align:top}
280th.valign-bottom,td.valign-bottom{vertical-align:bottom}
281th.valign-middle,td.valign-middle{vertical-align:middle}
282table thead th,table tfoot th{font-weight:bold}
283tbody tr th{background:#f7f8f7}
284tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
285p.tableblock>code:only-child{background:none;padding:0}
286p.tableblock{font-size:1em}
287ol{margin-left:1.75em}
288ul li ol{margin-left:1.5em}
289dl dd{margin-left:1.125em}
290dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
291li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
292ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
293ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
294ul.unstyled,ol.unstyled{margin-left:0}
295li>p:empty:only-child::before{content:"";display:inline-block}
296ul.checklist>li>p:first-child{margin-left:-1em}
297ul.checklist>li>p:first-child>.fa-square-o:first-child,ul.checklist>li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
298ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
299ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
300ul.inline>li{margin-left:1.25em}
301.unstyled dl dt{font-weight:400;font-style:normal}
302ol.arabic{list-style-type:decimal}
303ol.decimal{list-style-type:decimal-leading-zero}
304ol.loweralpha{list-style-type:lower-alpha}
305ol.upperalpha{list-style-type:upper-alpha}
306ol.lowerroman{list-style-type:lower-roman}
307ol.upperroman{list-style-type:upper-roman}
308ol.lowergreek{list-style-type:lower-greek}
309.hdlist>table,.colist>table{border:0;background:none}
310.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
311td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
312td.hdlist1{font-weight:bold;padding-bottom:1.25em}
313td.hdlist2{word-wrap:anywhere}
314.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
315.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
316.colist td:not([class]):first-child img{max-width:none}
317.colist td:not([class]):last-child{padding:.25em 0}
318.thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
319.imageblock.left{margin:.25em .625em 1.25em 0}
320.imageblock.right{margin:.25em 0 1.25em .625em}
321.imageblock>.title{margin-bottom:0}
322.imageblock.thumb,.imageblock.th{border-width:6px}
323.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
324.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
325.image.left{margin-right:.625em}
326.image.right{margin-left:.625em}
327a.image{text-decoration:none;display:inline-block}
328a.image object{pointer-events:none}
329sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
330sup.footnote a,sup.footnoteref a{text-decoration:none}
Junio C Hamanod6a33e42025-02-18 23:45:11331sup.footnote a:active,sup.footnoteref a:active,#footnotes .footnote a:first-of-type:active{text-decoration:underline}
Junio C Hamanob96f40a2024-08-01 00:57:25332#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
333#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
334#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
335#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
336#footnotes .footnote:last-of-type{margin-bottom:0}
337#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
338div.unbreakable{page-break-inside:avoid}
339.big{font-size:larger}
340.small{font-size:smaller}
341.underline{text-decoration:underline}
342.overline{text-decoration:overline}
343.line-through{text-decoration:line-through}
344.aqua{color:#00bfbf}
345.aqua-background{background:#00fafa}
346.black{color:#000}
347.black-background{background:#000}
348.blue{color:#0000bf}
349.blue-background{background:#0000fa}
350.fuchsia{color:#bf00bf}
351.fuchsia-background{background:#fa00fa}
352.gray{color:#606060}
353.gray-background{background:#7d7d7d}
354.green{color:#006000}
355.green-background{background:#007d00}
356.lime{color:#00bf00}
357.lime-background{background:#00fa00}
358.maroon{color:#600000}
359.maroon-background{background:#7d0000}
360.navy{color:#000060}
361.navy-background{background:#00007d}
362.olive{color:#606000}
363.olive-background{background:#7d7d00}
364.purple{color:#600060}
365.purple-background{background:#7d007d}
366.red{color:#bf0000}
367.red-background{background:#fa0000}
368.silver{color:#909090}
369.silver-background{background:#bcbcbc}
370.teal{color:#006060}
371.teal-background{background:#007d7d}
372.white{color:#bfbfbf}
373.white-background{background:#fafafa}
374.yellow{color:#bfbf00}
375.yellow-background{background:#fafa00}
376span.icon>.fa{cursor:default}
377a span.icon>.fa{cursor:inherit}
378.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
379.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
380.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
381.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
382.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
383.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
384.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
385.conum[data-value] *{color:#fff!important}
386.conum[data-value]+b{display:none}
387.conum[data-value]::after{content:attr(data-value)}
388pre .conum[data-value]{position:relative;top:-.125em}
389b.conum *{color:inherit!important}
390.conum:not([data-value]):empty{display:none}
391dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
392h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
393p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
394p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
395p{margin-bottom:1.25rem}
396.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
397.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
398.print-only{display:none!important}
399@page{margin:1.25cm .75cm}
400@media print{*{box-shadow:none!important;text-shadow:none!important}
401html{font-size:80%}
402a{color:inherit!important;text-decoration:underline!important}
403a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
404a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
405abbr[title]{border-bottom:1px dotted}
406abbr[title]::after{content:" (" attr(title) ")"}
407pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
408thead{display:table-header-group}
409svg{max-width:100%}
410p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
411h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
412#header,#content,#footnotes,#footer{max-width:none}
413#toc,.sidebarblock,.exampleblock>.content{background:none!important}
414#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
415body.book #header{text-align:center}
416body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
417body.book #header .details{border:0!important;display:block;padding:0!important}
418body.book #header .details span:first-child{margin-left:0!important}
419body.book #header .details br{display:block}
420body.book #header .details br+span::before{content:none!important}
421body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
422body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
423.listingblock code[data-lang]::before{display:block}
424#footer{padding:0 .9375em}
425.hide-on-print{display:none!important}
426.print-only{display:block!important}
427.hide-for-print{display:none!important}
428.show-for-print{display:inherit!important}}
429@media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
430.sect1{padding:0!important}
431.sect1+.sect1{border:0}
432#footer{background:none}
433#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
434@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
435</style>
436<style>
437pre>code {
438 display: inline;
439}
440</style>
441</head>
442<body class="manpage">
443<div id="header">
444<h1>git-replay(1) Manual Page</h1>
445<h2 id="_name">NAME</h2>
446<div class="sectionbody">
447<p>git-replay - EXPERIMENTAL: Replay commits on a new base, works with bare repos too</p>
448</div>
449</div>
450<div id="content">
451<div class="sect1">
452<h2 id="_synopsis">SYNOPSIS</h2>
453<div class="sectionbody">
454<div class="verseblock">
455<pre class="content">(EXPERIMENTAL!) <em>git replay</em> ([--contained] --onto &lt;newbase&gt; | --advance &lt;branch&gt;) &lt;revision-range&gt;&#8230;&#8203;</pre>
456</div>
457</div>
458</div>
459<div class="sect1">
460<h2 id="_description">DESCRIPTION</h2>
461<div class="sectionbody">
462<div class="paragraph">
463<p>Takes ranges of commits and replays them onto a new location. Leaves
464the working tree and the index untouched, and updates no references.
465The output of this command is meant to be used as input to
Junio C Hamanodc392382024-10-11 18:57:29466<code>git</code> <code>update-ref</code> <code>--stdin</code>, which would update the relevant branches
Junio C Hamanob96f40a2024-08-01 00:57:25467(see the OUTPUT section below).</p>
468</div>
469<div class="paragraph">
470<p>THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.</p>
471</div>
472</div>
473</div>
474<div class="sect1">
475<h2 id="_options">OPTIONS</h2>
476<div class="sectionbody">
477<div class="dlist">
478<dl>
479<dt class="hdlist1">--onto &lt;newbase&gt;</dt>
480<dd>
481<p>Starting point at which to create the new commits. May be any
482valid commit, and not just an existing branch name.</p>
483<div class="paragraph">
484<p>When <code>--onto</code> is specified, the update-ref command(s) in the output will
485update the branch(es) in the revision range to point at the new
Junio C Hamanodc392382024-10-11 18:57:29486commits, similar to the way how <code>git</code> <code>rebase</code> <code>--update-refs</code> updates
Junio C Hamanob96f40a2024-08-01 00:57:25487multiple branches in the affected range.</p>
488</div>
489</dd>
490<dt class="hdlist1">--advance &lt;branch&gt;</dt>
491<dd>
492<p>Starting point at which to create the new commits; must be a
493branch name.</p>
494<div class="paragraph">
495<p>When <code>--advance</code> is specified, the update-ref command(s) in the output
496will update the branch passed as an argument to <code>--advance</code> to point at
497the new commits (in other words, this mimics a cherry-pick operation).</p>
498</div>
499</dd>
500<dt class="hdlist1">&lt;revision-range&gt;</dt>
501<dd>
502<p>Range of commits to replay. More than one &lt;revision-range&gt; can
Junio C Hamanodc392382024-10-11 18:57:29503be passed, but in <code>--advance</code> <em>&lt;branch&gt;</em> mode, they should have
Junio C Hamanob96f40a2024-08-01 00:57:25504a single tip, so that it&#8217;s clear where &lt;branch&gt; should point
505to. See "Specifying Ranges" in <a href="git-rev-parse.html">git-rev-parse(1)</a> and the
506"Commit Limiting" options below.</p>
507</dd>
508</dl>
509</div>
510<div class="sect2">
511<h3 id="_commit_limiting">Commit Limiting</h3>
512<div class="paragraph">
513<p>Besides specifying a range of commits that should be listed using the
514special notations explained in the description, additional commit
515limiting may be applied.</p>
516</div>
517<div class="paragraph">
518<p>Using more options generally further limits the output (e.g.
Junio C Hamanodc392382024-10-11 18:57:29519<code>--since=</code><em>&lt;date1&gt;</em> limits to commits newer than <em>&lt;date1&gt;</em>, and using it
520with <code>--grep=</code><em>&lt;pattern&gt;</em> further limits to commits whose log message
521has a line that matches <em>&lt;pattern&gt;</em>), unless otherwise noted.</p>
Junio C Hamanob96f40a2024-08-01 00:57:25522</div>
523<div class="paragraph">
524<p>Note that these are applied before commit
525ordering and formatting options, such as <code>--reverse</code>.</p>
526</div>
527<div class="dlist">
528<dl>
529<dt class="hdlist1">-&lt;number&gt;</dt>
530<dt class="hdlist1">-n &lt;number&gt;</dt>
531<dt class="hdlist1">--max-count=&lt;number&gt;</dt>
532<dd>
533<p>Limit the number of commits to output.</p>
534</dd>
535<dt class="hdlist1">--skip=&lt;number&gt;</dt>
536<dd>
537<p>Skip <em>number</em> commits before starting to show the commit output.</p>
538</dd>
539<dt class="hdlist1">--since=&lt;date&gt;</dt>
540<dt class="hdlist1">--after=&lt;date&gt;</dt>
541<dd>
542<p>Show commits more recent than a specific date.</p>
543</dd>
544<dt class="hdlist1">--since-as-filter=&lt;date&gt;</dt>
545<dd>
546<p>Show all commits more recent than a specific date. This visits
547all commits in the range, rather than stopping at the first commit which
548is older than a specific date.</p>
549</dd>
550<dt class="hdlist1">--until=&lt;date&gt;</dt>
551<dt class="hdlist1">--before=&lt;date&gt;</dt>
552<dd>
553<p>Show commits older than a specific date.</p>
554</dd>
555<dt class="hdlist1">--author=&lt;pattern&gt;</dt>
556<dt class="hdlist1">--committer=&lt;pattern&gt;</dt>
557<dd>
558<p>Limit the commits output to ones with author/committer
559header lines that match the specified pattern (regular
Junio C Hamanodc392382024-10-11 18:57:29560expression). With more than one <code>--author=</code><em>&lt;pattern&gt;</em>,
Junio C Hamanob96f40a2024-08-01 00:57:25561commits whose author matches any of the given patterns are
Junio C Hamanodc392382024-10-11 18:57:29562chosen (similarly for multiple <code>--committer=</code><em>&lt;pattern&gt;</em>).</p>
Junio C Hamanob96f40a2024-08-01 00:57:25563</dd>
564<dt class="hdlist1">--grep-reflog=&lt;pattern&gt;</dt>
565<dd>
566<p>Limit the commits output to ones with reflog entries that
567match the specified pattern (regular expression). With
568more than one <code>--grep-reflog</code>, commits whose reflog message
569matches any of the given patterns are chosen. It is an
570error to use this option unless <code>--walk-reflogs</code> is in use.</p>
571</dd>
572<dt class="hdlist1">--grep=&lt;pattern&gt;</dt>
573<dd>
574<p>Limit the commits output to ones with a log message that
575matches the specified pattern (regular expression). With
Junio C Hamanodc392382024-10-11 18:57:29576more than one <code>--grep=</code><em>&lt;pattern&gt;</em>, commits whose message
Junio C Hamanob96f40a2024-08-01 00:57:25577matches any of the given patterns are chosen (but see
578<code>--all-match</code>).</p>
579<div class="paragraph">
580<p>When <code>--notes</code> is in effect, the message from the notes is
581matched as if it were part of the log message.</p>
582</div>
583</dd>
584<dt class="hdlist1">--all-match</dt>
585<dd>
586<p>Limit the commits output to ones that match all given <code>--grep</code>,
587instead of ones that match at least one.</p>
588</dd>
589<dt class="hdlist1">--invert-grep</dt>
590<dd>
591<p>Limit the commits output to ones with a log message that do not
Junio C Hamanodc392382024-10-11 18:57:29592match the pattern specified with <code>--grep=</code><em>&lt;pattern&gt;</em>.</p>
Junio C Hamanob96f40a2024-08-01 00:57:25593</dd>
594<dt class="hdlist1">-i</dt>
595<dt class="hdlist1">--regexp-ignore-case</dt>
596<dd>
597<p>Match the regular expression limiting patterns without regard to letter
598case.</p>
599</dd>
600<dt class="hdlist1">--basic-regexp</dt>
601<dd>
602<p>Consider the limiting patterns to be basic regular expressions;
603this is the default.</p>
604</dd>
605<dt class="hdlist1">-E</dt>
606<dt class="hdlist1">--extended-regexp</dt>
607<dd>
608<p>Consider the limiting patterns to be extended regular expressions
609instead of the default basic regular expressions.</p>
610</dd>
611<dt class="hdlist1">-F</dt>
612<dt class="hdlist1">--fixed-strings</dt>
613<dd>
614<p>Consider the limiting patterns to be fixed strings (don&#8217;t interpret
615pattern as a regular expression).</p>
616</dd>
617<dt class="hdlist1">-P</dt>
618<dt class="hdlist1">--perl-regexp</dt>
619<dd>
620<p>Consider the limiting patterns to be Perl-compatible regular
621expressions.</p>
622<div class="paragraph">
623<p>Support for these types of regular expressions is an optional
624compile-time dependency. If Git wasn&#8217;t compiled with support for them
625providing this option will cause it to die.</p>
626</div>
627</dd>
628<dt class="hdlist1">--remove-empty</dt>
629<dd>
630<p>Stop when a given path disappears from the tree.</p>
631</dd>
632<dt class="hdlist1">--merges</dt>
633<dd>
634<p>Print only merge commits. This is exactly the same as <code>--min-parents=2</code>.</p>
635</dd>
636<dt class="hdlist1">--no-merges</dt>
637<dd>
638<p>Do not print commits with more than one parent. This is
639exactly the same as <code>--max-parents=1</code>.</p>
640</dd>
641<dt class="hdlist1">--min-parents=&lt;number&gt;</dt>
642<dt class="hdlist1">--max-parents=&lt;number&gt;</dt>
643<dt class="hdlist1">--no-min-parents</dt>
644<dt class="hdlist1">--no-max-parents</dt>
645<dd>
646<p>Show only commits which have at least (or at most) that many parent
647commits. In particular, <code>--max-parents=1</code> is the same as <code>--no-merges</code>,
648<code>--min-parents=2</code> is the same as <code>--merges</code>. <code>--max-parents=0</code>
649gives all root commits and <code>--min-parents=3</code> all octopus merges.</p>
650<div class="paragraph">
651<p><code>--no-min-parents</code> and <code>--no-max-parents</code> reset these limits (to no limit)
652again. Equivalent forms are <code>--min-parents=0</code> (any commit has 0 or more
653parents) and <code>--max-parents=-1</code> (negative numbers denote no upper limit).</p>
654</div>
655</dd>
656<dt class="hdlist1">--first-parent</dt>
657<dd>
658<p>When finding commits to include, follow only the first
659parent commit upon seeing a merge commit. This option
660can give a better overview when viewing the evolution of
661a particular topic branch, because merges into a topic
662branch tend to be only about adjusting to updated upstream
663from time to time, and this option allows you to ignore
664the individual commits brought in to your history by such
665a merge.</p>
666</dd>
667<dt class="hdlist1">--exclude-first-parent-only</dt>
668<dd>
669<p>When finding commits to exclude (with a <em>^</em>), follow only
670the first parent commit upon seeing a merge commit.
671This can be used to find the set of changes in a topic branch
672from the point where it diverged from the remote branch, given
673that arbitrary merges can be valid topic branch changes.</p>
674</dd>
675<dt class="hdlist1">--not</dt>
676<dd>
677<p>Reverses the meaning of the <em>^</em> prefix (or lack thereof)
678for all following revision specifiers, up to the next <code>--not</code>.
679When used on the command line before --stdin, the revisions passed
680through stdin will not be affected by it. Conversely, when passed
681via standard input, the revisions passed on the command line will
682not be affected by it.</p>
683</dd>
684<dt class="hdlist1">--all</dt>
685<dd>
686<p>Pretend as if all the refs in <code>refs/</code>, along with <code>HEAD</code>, are
687listed on the command line as <em>&lt;commit&gt;</em>.</p>
688</dd>
689<dt class="hdlist1">--branches[=&lt;pattern&gt;]</dt>
690<dd>
691<p>Pretend as if all the refs in <code>refs/heads</code> are listed
692on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
693branches to ones matching given shell glob. If pattern lacks <em>?</em>,
694<em>*</em>, or <em>[</em>, <em>/*</em> at the end is implied.</p>
695</dd>
696<dt class="hdlist1">--tags[=&lt;pattern&gt;]</dt>
697<dd>
698<p>Pretend as if all the refs in <code>refs/tags</code> are listed
699on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
700tags to ones matching given shell glob. If pattern lacks <em>?</em>, <em>*</em>,
701or <em>[</em>, <em>/*</em> at the end is implied.</p>
702</dd>
703<dt class="hdlist1">--remotes[=&lt;pattern&gt;]</dt>
704<dd>
705<p>Pretend as if all the refs in <code>refs/remotes</code> are listed
706on the command line as <em>&lt;commit&gt;</em>. If <em>&lt;pattern&gt;</em> is given, limit
707remote-tracking branches to ones matching given shell glob.
708If pattern lacks <em>?</em>, <em>*</em>, or <em>[</em>, <em>/*</em> at the end is implied.</p>
709</dd>
710<dt class="hdlist1">--glob=&lt;glob-pattern&gt;</dt>
711<dd>
712<p>Pretend as if all the refs matching shell glob <em>&lt;glob-pattern&gt;</em>
713are listed on the command line as <em>&lt;commit&gt;</em>. Leading <em>refs/</em>,
714is automatically prepended if missing. If pattern lacks <em>?</em>, <em>*</em>,
715or <em>[</em>, <em>/*</em> at the end is implied.</p>
716</dd>
717<dt class="hdlist1">--exclude=&lt;glob-pattern&gt;</dt>
718<dd>
719<p>Do not include refs matching <em>&lt;glob-pattern&gt;</em> that the next <code>--all</code>,
720<code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or <code>--glob</code> would otherwise
721consider. Repetitions of this option accumulate exclusion patterns
722up to the next <code>--all</code>, <code>--branches</code>, <code>--tags</code>, <code>--remotes</code>, or
723<code>--glob</code> option (other options or arguments do not clear
724accumulated patterns).</p>
725<div class="paragraph">
726<p>The patterns given should not begin with <code>refs/heads</code>, <code>refs/tags</code>, or
727<code>refs/remotes</code> when applied to <code>--branches</code>, <code>--tags</code>, or <code>--remotes</code>,
728respectively, and they must begin with <code>refs/</code> when applied to <code>--glob</code>
729or <code>--all</code>. If a trailing <em>/*</em> is intended, it must be given
730explicitly.</p>
731</div>
732</dd>
733<dt class="hdlist1">--exclude-hidden=[fetch|receive|uploadpack]</dt>
734<dd>
735<p>Do not include refs that would be hidden by <code>git-fetch</code>,
736<code>git-receive-pack</code> or <code>git-upload-pack</code> by consulting the appropriate
737<code>fetch.hideRefs</code>, <code>receive.hideRefs</code> or <code>uploadpack.hideRefs</code>
738configuration along with <code>transfer.hideRefs</code> (see
739<a href="git-config.html">git-config(1)</a>). This option affects the next pseudo-ref option
740<code>--all</code> or <code>--glob</code> and is cleared after processing them.</p>
741</dd>
742<dt class="hdlist1">--reflog</dt>
743<dd>
744<p>Pretend as if all objects mentioned by reflogs are listed on the
Junio C Hamanodc392382024-10-11 18:57:29745command line as <em>&lt;commit&gt;</em>.</p>
Junio C Hamanob96f40a2024-08-01 00:57:25746</dd>
747<dt class="hdlist1">--alternate-refs</dt>
748<dd>
749<p>Pretend as if all objects mentioned as ref tips of alternate
750repositories were listed on the command line. An alternate
751repository is any repository whose object directory is specified
752in <code>objects/info/alternates</code>. The set of included objects may
753be modified by <code>core.alternateRefsCommand</code>, etc. See
754<a href="git-config.html">git-config(1)</a>.</p>
755</dd>
756<dt class="hdlist1">--single-worktree</dt>
757<dd>
758<p>By default, all working trees will be examined by the
759following options when there are more than one (see
760<a href="git-worktree.html">git-worktree(1)</a>): <code>--all</code>, <code>--reflog</code> and
761<code>--indexed-objects</code>.
762This option forces them to examine the current working tree
763only.</p>
764</dd>
765<dt class="hdlist1">--ignore-missing</dt>
766<dd>
767<p>Upon seeing an invalid object name in the input, pretend as if
768the bad input was not given.</p>
769</dd>
770<dt class="hdlist1">--bisect</dt>
771<dd>
772<p>Pretend as if the bad bisection ref <code>refs/bisect/bad</code>
773was listed and as if it was followed by <code>--not</code> and the good
Junio C Hamanodc392382024-10-11 18:57:29774bisection refs <code>refs/bisect/good-</code>* on the command
Junio C Hamanob96f40a2024-08-01 00:57:25775line.</p>
776</dd>
777<dt class="hdlist1">--stdin</dt>
778<dd>
779<p>In addition to getting arguments from the command line, read
780them from standard input as well. This accepts commits and
781pseudo-options like <code>--all</code> and <code>--glob=</code>. When a <code>--</code> separator
782is seen, the following input is treated as paths and used to
783limit the result. Flags like <code>--not</code> which are read via standard input
784are only respected for arguments passed in the same way and will not
785influence any subsequent command line arguments.</p>
786</dd>
787<dt class="hdlist1">--cherry-mark</dt>
788<dd>
789<p>Like <code>--cherry-pick</code> (see below) but mark equivalent commits
790with <code>=</code> rather than omitting them, and inequivalent ones with <code>+</code>.</p>
791</dd>
792<dt class="hdlist1">--cherry-pick</dt>
793<dd>
794<p>Omit any commit that introduces the same change as
795another commit on the &#8220;other side&#8221; when the set of
796commits are limited with symmetric difference.</p>
797<div class="paragraph">
798<p>For example, if you have two branches, <code>A</code> and <code>B</code>, a usual way
799to list all commits on only one side of them is with
800<code>--left-right</code> (see the example below in the description of
801the <code>--left-right</code> option). However, it shows the commits that were
802cherry-picked from the other branch (for example, &#8220;3rd on b&#8221; may be
803cherry-picked from branch A). With this option, such pairs of commits are
804excluded from the output.</p>
805</div>
806</dd>
807<dt class="hdlist1">--left-only</dt>
808<dt class="hdlist1">--right-only</dt>
809<dd>
810<p>List only commits on the respective side of a symmetric difference,
Junio C Hamanodc392382024-10-11 18:57:29811i.e. only those which would be marked &lt; resp. &gt; by
Junio C Hamanob96f40a2024-08-01 00:57:25812<code>--left-right</code>.</p>
813<div class="paragraph">
Junio C Hamanodc392382024-10-11 18:57:29814<p>For example, <code>--cherry-pick</code> <code>--right-only</code> <code>A</code><code>...</code><code>B</code> omits those
Junio C Hamanob96f40a2024-08-01 00:57:25815commits from <code>B</code> which are in <code>A</code> or are patch-equivalent to a commit in
Junio C Hamanodc392382024-10-11 18:57:29816<code>A</code>. In other words, this lists the <code>+</code> commits from <code>git</code> <code>cherry</code> <code>A</code> <code>B</code>.
817More precisely, <code>--cherry-pick</code> <code>--right-only</code> <code>--no-merges</code> gives the exact
Junio C Hamanob96f40a2024-08-01 00:57:25818list.</p>
819</div>
820</dd>
821<dt class="hdlist1">--cherry</dt>
822<dd>
Junio C Hamanodc392382024-10-11 18:57:29823<p>A synonym for <code>--right-only</code> <code>--cherry-mark</code> <code>--no-merges</code>; useful to
Junio C Hamanob96f40a2024-08-01 00:57:25824limit the output to the commits on our side and mark those that
825have been applied to the other side of a forked history with
Junio C Hamanodc392382024-10-11 18:57:29826<code>git</code> <code>log</code> <code>--cherry</code> <code>upstream</code><code>...</code><code>mybranch</code>, similar to
827<code>git</code> <code>cherry</code> <code>upstream</code> <code>mybranch</code>.</p>
Junio C Hamanob96f40a2024-08-01 00:57:25828</dd>
829<dt class="hdlist1">-g</dt>
830<dt class="hdlist1">--walk-reflogs</dt>
831<dd>
832<p>Instead of walking the commit ancestry chain, walk
833reflog entries from the most recent one to older ones.
834When this option is used you cannot specify commits to
835exclude (that is, <em>^commit</em>, <em>commit1..commit2</em>,
836and <em>commit1...commit2</em> notations cannot be used).</p>
837<div class="paragraph">
838<p>With <code>--pretty</code> format other than <code>oneline</code> and <code>reference</code> (for obvious reasons),
839this causes the output to have two extra lines of information
840taken from the reflog. The reflog designator in the output may be shown
Junio C Hamanodc392382024-10-11 18:57:29841as <code>ref@</code>{<em>&lt;Nth&gt;</em>} (where <em>&lt;Nth&gt;</em> is the reverse-chronological index in the
842reflog) or as <code>ref@</code>{<em>&lt;timestamp&gt;</em>} (with the <em>&lt;timestamp&gt;</em> for that entry),
Junio C Hamanob96f40a2024-08-01 00:57:25843depending on a few rules:</p>
844</div>
845<div class="openblock">
846<div class="content">
847<div class="olist arabic">
848<ol class="arabic">
849<li>
Junio C Hamanodc392382024-10-11 18:57:29850<p>If the starting point is specified as <code>ref@</code>{<em>&lt;Nth&gt;</em>}, show the index
Junio C Hamanob96f40a2024-08-01 00:57:25851format.</p>
852</li>
853<li>
Junio C Hamanodc392382024-10-11 18:57:29854<p>If the starting point was specified as <code>ref@</code>{now}, show the
Junio C Hamanob96f40a2024-08-01 00:57:25855timestamp format.</p>
856</li>
857<li>
858<p>If neither was used, but <code>--date</code> was given on the command line, show
859the timestamp in the format requested by <code>--date</code>.</p>
860</li>
861<li>
862<p>Otherwise, show the index format.</p>
863</li>
864</ol>
865</div>
866</div>
867</div>
868<div class="paragraph">
869<p>Under <code>--pretty=oneline</code>, the commit message is
870prefixed with this information on the same line.
871This option cannot be combined with <code>--reverse</code>.
872See also <a href="git-reflog.html">git-reflog(1)</a>.</p>
873</div>
874<div class="paragraph">
875<p>Under <code>--pretty=reference</code>, this information will not be shown at all.</p>
876</div>
877</dd>
878<dt class="hdlist1">--merge</dt>
879<dd>
Junio C Hamanodc392382024-10-11 18:57:29880<p>Show commits touching conflicted paths in the range <code>HEAD</code><code>...</code><em>&lt;other&gt;</em>,
881where <em>&lt;other&gt;</em> is the first existing pseudoref in <code>MERGE_HEAD</code>,
Junio C Hamanob96f40a2024-08-01 00:57:25882<code>CHERRY_PICK_HEAD</code>, <code>REVERT_HEAD</code> or <code>REBASE_HEAD</code>. Only works
883when the index has unmerged entries. This option can be used to show
884relevant commits when resolving conflicts from a 3-way merge.</p>
885</dd>
886<dt class="hdlist1">--boundary</dt>
887<dd>
888<p>Output excluded boundary commits. Boundary commits are
889prefixed with <code>-</code>.</p>
890</dd>
891</dl>
892</div>
893</div>
894<div class="sect2">
895<h3 id="_history_simplification">History Simplification</h3>
896<div class="paragraph">
897<p>Sometimes you are only interested in parts of the history, for example the
898commits modifying a particular &lt;path&gt;. But there are two parts of
899<em>History Simplification</em>, one part is selecting the commits and the other
900is how to do it, as there are various strategies to simplify the history.</p>
901</div>
902<div class="paragraph">
903<p>The following options select the commits to be shown:</p>
904</div>
905<div class="dlist">
906<dl>
907<dt class="hdlist1">&lt;paths&gt;</dt>
908<dd>
909<p>Commits modifying the given &lt;paths&gt; are selected.</p>
910</dd>
911<dt class="hdlist1">--simplify-by-decoration</dt>
912<dd>
913<p>Commits that are referred by some branch or tag are selected.</p>
914</dd>
915</dl>
916</div>
917<div class="paragraph">
918<p>Note that extra commits can be shown to give a meaningful history.</p>
919</div>
920<div class="paragraph">
921<p>The following options affect the way the simplification is performed:</p>
922</div>
923<div class="dlist">
924<dl>
925<dt class="hdlist1">Default mode</dt>
926<dd>
927<p>Simplifies the history to the simplest history explaining the
928final state of the tree. Simplest because it prunes some side
929branches if the end result is the same (i.e. merging branches
930with the same content)</p>
931</dd>
932<dt class="hdlist1">--show-pulls</dt>
933<dd>
934<p>Include all commits from the default mode, but also any merge
935commits that are not TREESAME to the first parent but are
936TREESAME to a later parent. This mode is helpful for showing
937the merge commits that "first introduced" a change to a branch.</p>
938</dd>
939<dt class="hdlist1">--full-history</dt>
940<dd>
941<p>Same as the default mode, but does not prune some history.</p>
942</dd>
943<dt class="hdlist1">--dense</dt>
944<dd>
945<p>Only the selected commits are shown, plus some to have a
946meaningful history.</p>
947</dd>
948<dt class="hdlist1">--sparse</dt>
949<dd>
950<p>All commits in the simplified history are shown.</p>
951</dd>
952<dt class="hdlist1">--simplify-merges</dt>
953<dd>
954<p>Additional option to <code>--full-history</code> to remove some needless
955merges from the resulting history, as there are no selected
956commits contributing to this merge.</p>
957</dd>
958<dt class="hdlist1">--ancestry-path[=&lt;commit&gt;]</dt>
959<dd>
960<p>When given a range of commits to display (e.g. <em>commit1..commit2</em>
Junio C Hamanoa4df5b42024-12-13 16:41:22961or <em>commit2 ^commit1</em>), and a commit &lt;commit&gt; in that range,
962only display commits in that range
Junio C Hamanob96f40a2024-08-01 00:57:25963that are ancestors of &lt;commit&gt;, descendants of &lt;commit&gt;, or
964&lt;commit&gt; itself. If no commit is specified, use <em>commit1</em> (the
965excluded part of the range) as &lt;commit&gt;. Can be passed multiple
966times; if so, a commit is included if it is any of the commits
967given or if it is an ancestor or descendant of one of them.</p>
968</dd>
969</dl>
970</div>
971<div class="paragraph">
972<p>A more detailed explanation follows.</p>
973</div>
974<div class="paragraph">
975<p>Suppose you specified <code>foo</code> as the &lt;paths&gt;. We shall call commits
976that modify <code>foo</code> !TREESAME, and the rest TREESAME. (In a diff
977filtered for <code>foo</code>, they look different and equal, respectively.)</p>
978</div>
979<div class="paragraph">
980<p>In the following, we will always refer to the same example history to
981illustrate the differences between simplification settings. We assume
982that you are filtering for a file <code>foo</code> in this commit graph:</p>
983</div>
984<div class="listingblock">
985<div class="content">
986<pre> .-A---M---N---O---P---Q
987 / / / / / /
988 I B C D E Y
989 \ / / / / /
990 `-------------' X</pre>
991</div>
992</div>
993<div class="paragraph">
994<p>The horizontal line of history A---Q is taken to be the first parent of
995each merge. The commits are:</p>
996</div>
997<div class="ulist">
998<ul>
999<li>
1000<p><code>I</code> is the initial commit, in which <code>foo</code> exists with contents
1001&#8220;asdf&#8221;, and a file <code>quux</code> exists with contents &#8220;quux&#8221;. Initial
1002commits are compared to an empty tree, so <code>I</code> is !TREESAME.</p>
1003</li>
1004<li>
1005<p>In <code>A</code>, <code>foo</code> contains just &#8220;foo&#8221;.</p>
1006</li>
1007<li>
1008<p><code>B</code> contains the same change as <code>A</code>. Its merge <code>M</code> is trivial and
1009hence TREESAME to all parents.</p>
1010</li>
1011<li>
1012<p><code>C</code> does not change <code>foo</code>, but its merge <code>N</code> changes it to &#8220;foobar&#8221;,
1013so it is not TREESAME to any parent.</p>
1014</li>
1015<li>
1016<p><code>D</code> sets <code>foo</code> to &#8220;baz&#8221;. Its merge <code>O</code> combines the strings from
1017<code>N</code> and <code>D</code> to &#8220;foobarbaz&#8221;; i.e., it is not TREESAME to any parent.</p>
1018</li>
1019<li>
1020<p><code>E</code> changes <code>quux</code> to &#8220;xyzzy&#8221;, and its merge <code>P</code> combines the
1021strings to &#8220;quux xyzzy&#8221;. <code>P</code> is TREESAME to <code>O</code>, but not to <code>E</code>.</p>
1022</li>
1023<li>
1024<p><code>X</code> is an independent root commit that added a new file <code>side</code>, and <code>Y</code>
1025modified it. <code>Y</code> is TREESAME to <code>X</code>. Its merge <code>Q</code> added <code>side</code> to <code>P</code>, and
1026<code>Q</code> is TREESAME to <code>P</code>, but not to <code>Y</code>.</p>
1027</li>
1028</ul>
1029</div>
1030<div class="paragraph">
1031<p><code>rev-list</code> walks backwards through history, including or excluding
1032commits based on whether <code>--full-history</code> and/or parent rewriting
1033(via <code>--parents</code> or <code>--children</code>) are used. The following settings
1034are available.</p>
1035</div>
1036<div class="dlist">
1037<dl>
1038<dt class="hdlist1">Default mode</dt>
1039<dd>
1040<p>Commits are included if they are not TREESAME to any parent
1041(though this can be changed, see <code>--sparse</code> below). If the
1042commit was a merge, and it was TREESAME to one parent, follow
1043only that parent. (Even if there are several TREESAME
1044parents, follow only one of them.) Otherwise, follow all
1045parents.</p>
1046<div class="paragraph">
1047<p>This results in:</p>
1048</div>
1049<div class="listingblock">
1050<div class="content">
1051<pre> .-A---N---O
1052 / / /
1053 I---------D</pre>
1054</div>
1055</div>
1056<div class="paragraph">
1057<p>Note how the rule to only follow the TREESAME parent, if one is
1058available, removed <code>B</code> from consideration entirely. <code>C</code> was
1059considered via <code>N</code>, but is TREESAME. Root commits are compared to an
1060empty tree, so <code>I</code> is !TREESAME.</p>
1061</div>
1062<div class="paragraph">
1063<p>Parent/child relations are only visible with <code>--parents</code>, but that does
1064not affect the commits selected in default mode, so we have shown the
1065parent lines.</p>
1066</div>
1067</dd>
1068<dt class="hdlist1">--full-history without parent rewriting</dt>
1069<dd>
1070<p>This mode differs from the default in one point: always follow
1071all parents of a merge, even if it is TREESAME to one of them.
1072Even if more than one side of the merge has commits that are
1073included, this does not imply that the merge itself is! In
1074the example, we get</p>
1075<div class="listingblock">
1076<div class="content">
1077<pre> I A B N D O P Q</pre>
1078</div>
1079</div>
1080<div class="paragraph">
1081<p><code>M</code> was excluded because it is TREESAME to both parents. <code>E</code>,
1082<code>C</code> and <code>B</code> were all walked, but only <code>B</code> was !TREESAME, so the others
1083do not appear.</p>
1084</div>
1085<div class="paragraph">
1086<p>Note that without parent rewriting, it is not really possible to talk
1087about the parent/child relationships between the commits, so we show
1088them disconnected.</p>
1089</div>
1090</dd>
1091<dt class="hdlist1">--full-history with parent rewriting</dt>
1092<dd>
1093<p>Ordinary commits are only included if they are !TREESAME
1094(though this can be changed, see <code>--sparse</code> below).</p>
1095<div class="paragraph">
1096<p>Merges are always included. However, their parent list is rewritten:
1097Along each parent, prune away commits that are not included
1098themselves. This results in</p>
1099</div>
1100<div class="listingblock">
1101<div class="content">
1102<pre> .-A---M---N---O---P---Q
1103 / / / / /
1104 I B / D /
1105 \ / / / /
1106 `-------------'</pre>
1107</div>
1108</div>
1109<div class="paragraph">
1110<p>Compare to <code>--full-history</code> without rewriting above. Note that <code>E</code>
1111was pruned away because it is TREESAME, but the parent list of P was
1112rewritten to contain <code>E</code>'s parent <code>I</code>. The same happened for <code>C</code> and
1113<code>N</code>, and <code>X</code>, <code>Y</code> and <code>Q</code>.</p>
1114</div>
1115</dd>
1116</dl>
1117</div>
1118<div class="paragraph">
1119<p>In addition to the above settings, you can change whether TREESAME
1120affects inclusion:</p>
1121</div>
1122<div class="dlist">
1123<dl>
1124<dt class="hdlist1">--dense</dt>
1125<dd>
1126<p>Commits that are walked are included if they are not TREESAME
1127to any parent.</p>
1128</dd>
1129<dt class="hdlist1">--sparse</dt>
1130<dd>
1131<p>All commits that are walked are included.</p>
1132<div class="paragraph">
1133<p>Note that without <code>--full-history</code>, this still simplifies merges: if
1134one of the parents is TREESAME, we follow only that one, so the other
1135sides of the merge are never walked.</p>
1136</div>
1137</dd>
1138<dt class="hdlist1">--simplify-merges</dt>
1139<dd>
1140<p>First, build a history graph in the same way that
1141<code>--full-history</code> with parent rewriting does (see above).</p>
1142<div class="paragraph">
Junio C Hamanodc392382024-10-11 18:57:291143<p>Then simplify each commit <code>C</code> to its replacement <code>C</code>' in the final
Junio C Hamanob96f40a2024-08-01 00:57:251144history according to the following rules:</p>
1145</div>
1146<div class="openblock">
1147<div class="content">
1148<div class="ulist">
1149<ul>
1150<li>
Junio C Hamanodc392382024-10-11 18:57:291151<p>Set <code>C</code>' to <code>C</code>.</p>
Junio C Hamanob96f40a2024-08-01 00:57:251152</li>
1153<li>
Junio C Hamanodc392382024-10-11 18:57:291154<p>Replace each parent <code>P</code> of <code>C</code>' with its simplification <code>P</code>'. In
Junio C Hamanob96f40a2024-08-01 00:57:251155the process, drop parents that are ancestors of other parents or that are
1156root commits TREESAME to an empty tree, and remove duplicates, but take care
1157to never drop all parents that we are TREESAME to.</p>
1158</li>
1159<li>
Junio C Hamanodc392382024-10-11 18:57:291160<p>If after this parent rewriting, <code>C</code>' is a root or merge commit (has
Junio C Hamanob96f40a2024-08-01 00:57:251161zero or &gt;1 parents), a boundary commit, or !TREESAME, it remains.
1162Otherwise, it is replaced with its only parent.</p>
1163</li>
1164</ul>
1165</div>
1166</div>
1167</div>
1168<div class="paragraph">
1169<p>The effect of this is best shown by way of comparing to
1170<code>--full-history</code> with parent rewriting. The example turns into:</p>
1171</div>
1172<div class="listingblock">
1173<div class="content">
1174<pre> .-A---M---N---O
1175 / / /
1176 I B D
1177 \ / /
1178 `---------'</pre>
1179</div>
1180</div>
1181<div class="paragraph">
1182<p>Note the major differences in <code>N</code>, <code>P</code>, and <code>Q</code> over <code>--full-history</code>:</p>
1183</div>
1184<div class="openblock">
1185<div class="content">
1186<div class="ulist">
1187<ul>
1188<li>
1189<p><code>N</code>'s parent list had <code>I</code> removed, because it is an ancestor of the
1190other parent <code>M</code>. Still, <code>N</code> remained because it is !TREESAME.</p>
1191</li>
1192<li>
1193<p><code>P</code>'s parent list similarly had <code>I</code> removed. <code>P</code> was then
1194removed completely, because it had one parent and is TREESAME.</p>
1195</li>
1196<li>
1197<p><code>Q</code>'s parent list had <code>Y</code> simplified to <code>X</code>. <code>X</code> was then removed, because it
1198was a TREESAME root. <code>Q</code> was then removed completely, because it had one
1199parent and is TREESAME.</p>
1200</li>
1201</ul>
1202</div>
1203</div>
1204</div>
1205</dd>
1206</dl>
1207</div>
1208<div class="paragraph">
1209<p>There is another simplification mode available:</p>
1210</div>
1211<div class="dlist">
1212<dl>
1213<dt class="hdlist1">--ancestry-path[=&lt;commit&gt;]</dt>
1214<dd>
1215<p>Limit the displayed commits to those which are an ancestor of
1216&lt;commit&gt;, or which are a descendant of &lt;commit&gt;, or are &lt;commit&gt;
1217itself.</p>
1218<div class="paragraph">
1219<p>As an example use case, consider the following commit history:</p>
1220</div>
1221<div class="listingblock">
1222<div class="content">
1223<pre> D---E-------F
1224 / \ \
1225 B---C---G---H---I---J
1226 / \
1227 A-------K---------------L--M</pre>
1228</div>
1229</div>
1230<div class="paragraph">
1231<p>A regular <em>D..M</em> computes the set of commits that are ancestors of <code>M</code>,
1232but excludes the ones that are ancestors of <code>D</code>. This is useful to see
1233what happened to the history leading to <code>M</code> since <code>D</code>, in the sense
1234that &#8220;what does <code>M</code> have that did not exist in <code>D</code>&#8221;. The result in this
1235example would be all the commits, except <code>A</code> and <code>B</code> (and <code>D</code> itself,
1236of course).</p>
1237</div>
1238<div class="paragraph">
1239<p>When we want to find out what commits in <code>M</code> are contaminated with the
1240bug introduced by <code>D</code> and need fixing, however, we might want to view
1241only the subset of <em>D..M</em> that are actually descendants of <code>D</code>, i.e.
1242excluding <code>C</code> and <code>K</code>. This is exactly what the <code>--ancestry-path</code>
1243option does. Applied to the <em>D..M</em> range, it results in:</p>
1244</div>
1245<div class="listingblock">
1246<div class="content">
1247<pre> E-------F
1248 \ \
1249 G---H---I---J
1250 \
1251 L--M</pre>
1252</div>
1253</div>
1254<div class="paragraph">
1255<p>We can also use <code>--ancestry-path=D</code> instead of <code>--ancestry-path</code> which
1256means the same thing when applied to the <em>D..M</em> range but is just more
1257explicit.</p>
1258</div>
1259<div class="paragraph">
1260<p>If we instead are interested in a given topic within this range, and all
1261commits affected by that topic, we may only want to view the subset of
Junio C Hamanodc392382024-10-11 18:57:291262<code>D</code><code>..</code><code>M</code> which contain that topic in their ancestry path. So, using
1263<code>--ancestry-path=H</code> <code>D</code><code>..</code><code>M</code> for example would result in:</p>
Junio C Hamanob96f40a2024-08-01 00:57:251264</div>
1265<div class="listingblock">
1266<div class="content">
1267<pre> E
1268 \
1269 G---H---I---J
1270 \
1271 L--M</pre>
1272</div>
1273</div>
1274<div class="paragraph">
Junio C Hamanodc392382024-10-11 18:57:291275<p>Whereas <code>--ancestry-path=K</code> <code>D</code><code>..</code><code>M</code> would result in</p>
Junio C Hamanob96f40a2024-08-01 00:57:251276</div>
1277<div class="listingblock">
1278<div class="content">
1279<pre> K---------------L--M</pre>
1280</div>
1281</div>
1282</dd>
1283</dl>
1284</div>
1285<div class="paragraph">
1286<p>Before discussing another option, <code>--show-pulls</code>, we need to
1287create a new example history.</p>
1288</div>
1289<div class="paragraph">
1290<p>A common problem users face when looking at simplified history is that a
1291commit they know changed a file somehow does not appear in the file&#8217;s
1292simplified history. Let&#8217;s demonstrate a new example and show how options
1293such as <code>--full-history</code> and <code>--simplify-merges</code> works in that case:</p>
1294</div>
1295<div class="listingblock">
1296<div class="content">
1297<pre> .-A---M-----C--N---O---P
1298 / / \ \ \/ / /
1299 I B \ R-'`-Z' /
1300 \ / \/ /
1301 \ / /\ /
1302 `---X--' `---Y--'</pre>
1303</div>
1304</div>
1305<div class="paragraph">
1306<p>For this example, suppose <code>I</code> created <code>file.txt</code> which was modified by
1307<code>A</code>, <code>B</code>, and <code>X</code> in different ways. The single-parent commits <code>C</code>, <code>Z</code>,
1308and <code>Y</code> do not change <code>file.txt</code>. The merge commit <code>M</code> was created by
1309resolving the merge conflict to include both changes from <code>A</code> and <code>B</code>
1310and hence is not TREESAME to either. The merge commit <code>R</code>, however, was
1311created by ignoring the contents of <code>file.txt</code> at <code>M</code> and taking only
1312the contents of <code>file.txt</code> at <code>X</code>. Hence, <code>R</code> is TREESAME to <code>X</code> but not
1313<code>M</code>. Finally, the natural merge resolution to create <code>N</code> is to take the
1314contents of <code>file.txt</code> at <code>R</code>, so <code>N</code> is TREESAME to <code>R</code> but not <code>C</code>.
1315The merge commits <code>O</code> and <code>P</code> are TREESAME to their first parents, but
1316not to their second parents, <code>Z</code> and <code>Y</code> respectively.</p>
1317</div>
1318<div class="paragraph">
1319<p>When using the default mode, <code>N</code> and <code>R</code> both have a TREESAME parent, so
1320those edges are walked and the others are ignored. The resulting history
1321graph is:</p>
1322</div>
1323<div class="listingblock">
1324<div class="content">
1325<pre> I---X</pre>
1326</div>
1327</div>
1328<div class="paragraph">
1329<p>When using <code>--full-history</code>, Git walks every edge. This will discover
1330the commits <code>A</code> and <code>B</code> and the merge <code>M</code>, but also will reveal the
1331merge commits <code>O</code> and <code>P</code>. With parent rewriting, the resulting graph is:</p>
1332</div>
1333<div class="listingblock">
1334<div class="content">
1335<pre> .-A---M--------N---O---P
1336 / / \ \ \/ / /
1337 I B \ R-'`--' /
1338 \ / \/ /
1339 \ / /\ /
1340 `---X--' `------'</pre>
1341</div>
1342</div>
1343<div class="paragraph">
1344<p>Here, the merge commits <code>O</code> and <code>P</code> contribute extra noise, as they did
1345not actually contribute a change to <code>file.txt</code>. They only merged a topic
1346that was based on an older version of <code>file.txt</code>. This is a common
1347issue in repositories using a workflow where many contributors work in
1348parallel and merge their topic branches along a single trunk: many
1349unrelated merges appear in the <code>--full-history</code> results.</p>
1350</div>
1351<div class="paragraph">
1352<p>When using the <code>--simplify-merges</code> option, the commits <code>O</code> and <code>P</code>
1353disappear from the results. This is because the rewritten second parents
1354of <code>O</code> and <code>P</code> are reachable from their first parents. Those edges are
1355removed and then the commits look like single-parent commits that are
1356TREESAME to their parent. This also happens to the commit <code>N</code>, resulting
1357in a history view as follows:</p>
1358</div>
1359<div class="listingblock">
1360<div class="content">
1361<pre> .-A---M--.
1362 / / \
1363 I B R
1364 \ / /
1365 \ / /
1366 `---X--'</pre>
1367</div>
1368</div>
1369<div class="paragraph">
1370<p>In this view, we see all of the important single-parent changes from
1371<code>A</code>, <code>B</code>, and <code>X</code>. We also see the carefully-resolved merge <code>M</code> and the
1372not-so-carefully-resolved merge <code>R</code>. This is usually enough information
1373to determine why the commits <code>A</code> and <code>B</code> "disappeared" from history in
1374the default view. However, there are a few issues with this approach.</p>
1375</div>
1376<div class="paragraph">
1377<p>The first issue is performance. Unlike any previous option, the
1378<code>--simplify-merges</code> option requires walking the entire commit history
1379before returning a single result. This can make the option difficult to
1380use for very large repositories.</p>
1381</div>
1382<div class="paragraph">
1383<p>The second issue is one of auditing. When many contributors are working
1384on the same repository, it is important which merge commits introduced
1385a change into an important branch. The problematic merge <code>R</code> above is
1386not likely to be the merge commit that was used to merge into an
1387important branch. Instead, the merge <code>N</code> was used to merge <code>R</code> and <code>X</code>
1388into the important branch. This commit may have information about why
1389the change <code>X</code> came to override the changes from <code>A</code> and <code>B</code> in its
1390commit message.</p>
1391</div>
1392<div class="dlist">
1393<dl>
1394<dt class="hdlist1">--show-pulls</dt>
1395<dd>
1396<p>In addition to the commits shown in the default history, show
1397each merge commit that is not TREESAME to its first parent but
1398is TREESAME to a later parent.</p>
1399<div class="paragraph">
1400<p>When a merge commit is included by <code>--show-pulls</code>, the merge is
1401treated as if it "pulled" the change from another branch. When using
1402<code>--show-pulls</code> on this example (and no other options) the resulting
1403graph is:</p>
1404</div>
1405<div class="listingblock">
1406<div class="content">
1407<pre> I---X---R---N</pre>
1408</div>
1409</div>
1410<div class="paragraph">
1411<p>Here, the merge commits <code>R</code> and <code>N</code> are included because they pulled
1412the commits <code>X</code> and <code>R</code> into the base branch, respectively. These
1413merges are the reason the commits <code>A</code> and <code>B</code> do not appear in the
1414default history.</p>
1415</div>
1416<div class="paragraph">
1417<p>When <code>--show-pulls</code> is paired with <code>--simplify-merges</code>, the
1418graph includes all of the necessary information:</p>
1419</div>
1420<div class="listingblock">
1421<div class="content">
1422<pre> .-A---M--. N
1423 / / \ /
1424 I B R
1425 \ / /
1426 \ / /
1427 `---X--'</pre>
1428</div>
1429</div>
1430<div class="paragraph">
1431<p>Notice that since <code>M</code> is reachable from <code>R</code>, the edge from <code>N</code> to <code>M</code>
1432was simplified away. However, <code>N</code> still appears in the history as an
1433important commit because it "pulled" the change <code>R</code> into the main
1434branch.</p>
1435</div>
1436</dd>
1437</dl>
1438</div>
1439<div class="paragraph">
1440<p>The <code>--simplify-by-decoration</code> option allows you to view only the
1441big picture of the topology of the history, by omitting commits
1442that are not referenced by tags. Commits are marked as !TREESAME
1443(in other words, kept after history simplification rules described
1444above) if (1) they are referenced by tags, or (2) they change the
1445contents of the paths given on the command line. All other
1446commits are marked as TREESAME (subject to be simplified away).</p>
1447</div>
1448</div>
1449<div class="sect2">
1450<h3 id="_commit_ordering">Commit Ordering</h3>
1451<div class="paragraph">
1452<p>By default, the commits are shown in reverse chronological order.</p>
1453</div>
1454<div class="dlist">
1455<dl>
1456<dt class="hdlist1">--date-order</dt>
1457<dd>
1458<p>Show no parents before all of its children are shown, but
1459otherwise show commits in the commit timestamp order.</p>
1460</dd>
1461<dt class="hdlist1">--author-date-order</dt>
1462<dd>
1463<p>Show no parents before all of its children are shown, but
1464otherwise show commits in the author timestamp order.</p>
1465</dd>
1466<dt class="hdlist1">--topo-order</dt>
1467<dd>
1468<p>Show no parents before all of its children are shown, and
1469avoid showing commits on multiple lines of history
1470intermixed.</p>
1471<div class="paragraph">
1472<p>For example, in a commit history like this:</p>
1473</div>
1474<div class="listingblock">
1475<div class="content">
1476<pre> ---1----2----4----7
1477 \ \
1478 3----5----6----8---</pre>
1479</div>
1480</div>
1481<div class="paragraph">
Junio C Hamanodc392382024-10-11 18:57:291482<p>where the numbers denote the order of commit timestamps, <code>git</code>
1483<code>rev-list</code> and friends with <code>--date-order</code> show the commits in the
Junio C Hamanob96f40a2024-08-01 00:57:251484timestamp order: 8 7 6 5 4 3 2 1.</p>
1485</div>
1486<div class="paragraph">
1487<p>With <code>--topo-order</code>, they would show 8 6 5 3 7 4 2 1 (or 8 7 4 2 6 5
14883 1); some older commits are shown before newer ones in order to
1489avoid showing the commits from two parallel development track mixed
1490together.</p>
1491</div>
1492</dd>
1493<dt class="hdlist1">--reverse</dt>
1494<dd>
1495<p>Output the commits chosen to be shown (see Commit Limiting
1496section above) in reverse order. Cannot be combined with
1497<code>--walk-reflogs</code>.</p>
1498</dd>
1499</dl>
1500</div>
1501</div>
1502<div class="sect2">
1503<h3 id="_object_traversal">Object Traversal</h3>
1504<div class="paragraph">
1505<p>These options are mostly targeted for packing of Git repositories.</p>
1506</div>
1507<div class="dlist">
1508<dl>
1509<dt class="hdlist1">--no-walk[=(sorted|unsorted)]</dt>
1510<dd>
1511<p>Only show the given commits, but do not traverse their ancestors.
1512This has no effect if a range is specified. If the argument
1513<code>unsorted</code> is given, the commits are shown in the order they were
1514given on the command line. Otherwise (if <code>sorted</code> or no argument
1515was given), the commits are shown in reverse chronological order
1516by commit time.
1517Cannot be combined with <code>--graph</code>.</p>
1518</dd>
1519<dt class="hdlist1">--do-walk</dt>
1520<dd>
1521<p>Overrides a previous <code>--no-walk</code>.</p>
1522</dd>
1523</dl>
1524</div>
1525</div>
1526<div class="sect2">
1527<h3 id="_commit_formatting">Commit Formatting</h3>
1528<div class="dlist">
1529<dl>
1530<dt class="hdlist1">--pretty[=&lt;format&gt;]</dt>
1531<dt class="hdlist1">--format=&lt;format&gt;</dt>
1532<dd>
1533<p>Pretty-print the contents of the commit logs in a given format,
1534where <em>&lt;format&gt;</em> can be one of <em>oneline</em>, <em>short</em>, <em>medium</em>,
1535<em>full</em>, <em>fuller</em>, <em>reference</em>, <em>email</em>, <em>raw</em>, <em>format:&lt;string&gt;</em>
1536and <em>tformat:&lt;string&gt;</em>. When <em>&lt;format&gt;</em> is none of the above,
1537and has <em>%placeholder</em> in it, it acts as if
1538<em>--pretty=tformat:&lt;format&gt;</em> were given.</p>
1539<div class="paragraph">
1540<p>See the "PRETTY FORMATS" section for some additional details for each
1541format. When <em>=&lt;format&gt;</em> part is omitted, it defaults to <em>medium</em>.</p>
1542</div>
1543<div class="paragraph">
1544<p>Note: you can specify the default pretty format in the repository
1545configuration (see <a href="git-config.html">git-config(1)</a>).</p>
1546</div>
1547</dd>
1548<dt class="hdlist1">--abbrev-commit</dt>
1549<dd>
1550<p>Instead of showing the full 40-byte hexadecimal commit object
1551name, show a prefix that names the object uniquely.
1552"--abbrev=&lt;n&gt;" (which also modifies diff output, if it is displayed)
1553option can be used to specify the minimum length of the prefix.</p>
1554<div class="paragraph">
1555<p>This should make "--pretty=oneline" a whole lot more readable for
1556people using 80-column terminals.</p>
1557</div>
1558</dd>
1559<dt class="hdlist1">--no-abbrev-commit</dt>
1560<dd>
1561<p>Show the full 40-byte hexadecimal commit object name. This negates
1562<code>--abbrev-commit</code>, either explicit or implied by other options such
1563as "--oneline". It also overrides the <code>log.abbrevCommit</code> variable.</p>
1564</dd>
1565<dt class="hdlist1">--oneline</dt>
1566<dd>
1567<p>This is a shorthand for "--pretty=oneline --abbrev-commit"
1568used together.</p>
1569</dd>
1570<dt class="hdlist1">--encoding=&lt;encoding&gt;</dt>
1571<dd>
1572<p>Commit objects record the character encoding used for the log message
1573in their encoding header; this option can be used to tell the
1574command to re-code the commit log message in the encoding
1575preferred by the user. For non plumbing commands this
1576defaults to UTF-8. Note that if an object claims to be encoded
1577in <code>X</code> and we are outputting in <code>X</code>, we will output the object
1578verbatim; this means that invalid sequences in the original
1579commit may be copied to the output. Likewise, if iconv(3) fails
1580to convert the commit, we will quietly output the original
1581object verbatim.</p>
1582</dd>
1583<dt class="hdlist1">--expand-tabs=&lt;n&gt;</dt>
1584<dt class="hdlist1">--expand-tabs</dt>
1585<dt class="hdlist1">--no-expand-tabs</dt>
1586<dd>
1587<p>Perform a tab expansion (replace each tab with enough spaces
1588to fill to the next display column that is a multiple of <em>&lt;n&gt;</em>)
1589in the log message before showing it in the output.
1590<code>--expand-tabs</code> is a short-hand for <code>--expand-tabs=8</code>, and
1591<code>--no-expand-tabs</code> is a short-hand for <code>--expand-tabs=0</code>,
1592which disables tab expansion.</p>
1593<div class="paragraph">
1594<p>By default, tabs are expanded in pretty formats that indent the log
1595message by 4 spaces (i.e. <em>medium</em>, which is the default, <em>full</em>,
1596and <em>fuller</em>).</p>
1597</div>
1598</dd>
1599<dt class="hdlist1">--notes[=&lt;ref&gt;]</dt>
1600<dd>
1601<p>Show the notes (see <a href="git-notes.html">git-notes(1)</a>) that annotate the
1602commit, when showing the commit log message. This is the default
Junio C Hamanodc392382024-10-11 18:57:291603for <code>git</code> <code>log</code>, <code>git</code> <code>show</code> and <code>git</code> <code>whatchanged</code> commands when
Junio C Hamanob96f40a2024-08-01 00:57:251604there is no <code>--pretty</code>, <code>--format</code>, or <code>--oneline</code> option given
1605on the command line.</p>
1606<div class="paragraph">
1607<p>By default, the notes shown are from the notes refs listed in the
1608<code>core.notesRef</code> and <code>notes.displayRef</code> variables (or corresponding
1609environment overrides). See <a href="git-config.html">git-config(1)</a> for more details.</p>
1610</div>
1611<div class="paragraph">
1612<p>With an optional <em>&lt;ref&gt;</em> argument, use the ref to find the notes
1613to display. The ref can specify the full refname when it begins
1614with <code>refs/notes/</code>; when it begins with <code>notes/</code>, <code>refs/</code> and otherwise
1615<code>refs/notes/</code> is prefixed to form the full name of the ref.</p>
1616</div>
1617<div class="paragraph">
1618<p>Multiple --notes options can be combined to control which notes are
1619being displayed. Examples: "--notes=foo" will show only notes from
1620"refs/notes/foo"; "--notes=foo --notes" will show both notes from
1621"refs/notes/foo" and from the default notes ref(s).</p>
1622</div>
1623</dd>
1624<dt class="hdlist1">--no-notes</dt>
1625<dd>
1626<p>Do not show notes. This negates the above <code>--notes</code> option, by
1627resetting the list of notes refs from which notes are shown.
1628Options are parsed in the order given on the command line, so e.g.
1629"--notes --notes=foo --no-notes --notes=bar" will only show notes
1630from "refs/notes/bar".</p>
1631</dd>
1632<dt class="hdlist1">--show-notes-by-default</dt>
1633<dd>
1634<p>Show the default notes unless options for displaying specific
1635notes are given.</p>
1636</dd>
1637<dt class="hdlist1">--show-notes[=&lt;ref&gt;]</dt>
1638<dt class="hdlist1">--[no-]standard-notes</dt>
1639<dd>
1640<p>These options are deprecated. Use the above --notes/--no-notes
1641options instead.</p>
1642</dd>
1643<dt class="hdlist1">--show-signature</dt>
1644<dd>
1645<p>Check the validity of a signed commit object by passing the signature
Junio C Hamanodc392382024-10-11 18:57:291646to <code>gpg</code> <code>--verify</code> and show the output.</p>
Junio C Hamanob96f40a2024-08-01 00:57:251647</dd>
1648<dt class="hdlist1">--relative-date</dt>
1649<dd>
1650<p>Synonym for <code>--date=relative</code>.</p>
1651</dd>
1652<dt class="hdlist1">--date=&lt;format&gt;</dt>
1653<dd>
1654<p>Only takes effect for dates shown in human-readable format, such
1655as when using <code>--pretty</code>. <code>log.date</code> config variable sets a default
1656value for the log command&#8217;s <code>--date</code> option. By default, dates
1657are shown in the original time zone (either committer&#8217;s or
1658author&#8217;s). If <code>-local</code> is appended to the format (e.g.,
1659<code>iso-local</code>), the user&#8217;s local time zone is used instead.</p>
1660<div class="openblock">
1661<div class="content">
1662<div class="paragraph">
1663<p><code>--date=relative</code> shows dates relative to the current time,
1664e.g. &#8220;2 hours ago&#8221;. The <code>-local</code> option has no effect for
1665<code>--date=relative</code>.</p>
1666</div>
1667<div class="paragraph">
1668<p><code>--date=local</code> is an alias for <code>--date=default-local</code>.</p>
1669</div>
1670<div class="paragraph">
1671<p><code>--date=iso</code> (or <code>--date=iso8601</code>) shows timestamps in a ISO 8601-like format.
1672The differences to the strict ISO 8601 format are:</p>
1673</div>
1674<div class="ulist">
1675<ul>
1676<li>
1677<p>a space instead of the <code>T</code> date/time delimiter</p>
1678</li>
1679<li>
1680<p>a space between time and time zone</p>
1681</li>
1682<li>
1683<p>no colon between hours and minutes of the time zone</p>
1684</li>
1685</ul>
1686</div>
1687<div class="paragraph">
1688<p><code>--date=iso-strict</code> (or <code>--date=iso8601-strict</code>) shows timestamps in strict
1689ISO 8601 format.</p>
1690</div>
1691<div class="paragraph">
1692<p><code>--date=rfc</code> (or <code>--date=rfc2822</code>) shows timestamps in RFC 2822
1693format, often found in email messages.</p>
1694</div>
1695<div class="paragraph">
1696<p><code>--date=short</code> shows only the date, but not the time, in <code>YYYY-MM-DD</code> format.</p>
1697</div>
1698<div class="paragraph">
1699<p><code>--date=raw</code> shows the date as seconds since the epoch (1970-01-01
170000:00:00 UTC), followed by a space, and then the timezone as an offset
1701from UTC (a <code>+</code> or <code>-</code> with four digits; the first two are hours, and
1702the second two are minutes). I.e., as if the timestamp were formatted
Junio C Hamanodc392382024-10-11 18:57:291703with <code>strftime</code>("%s %z")).
Junio C Hamanob96f40a2024-08-01 00:57:251704Note that the <code>-local</code> option does not affect the seconds-since-epoch
1705value (which is always measured in UTC), but does switch the accompanying
1706timezone value.</p>
1707</div>
1708<div class="paragraph">
1709<p><code>--date=human</code> shows the timezone if the timezone does not match the
1710current time-zone, and doesn&#8217;t print the whole date if that matches
1711(ie skip printing year for dates that are "this year", but also skip
1712the whole date itself if it&#8217;s in the last few days and we can just say
1713what weekday it was). For older dates the hour and minute is also
1714omitted.</p>
1715</div>
1716<div class="paragraph">
1717<p><code>--date=unix</code> shows the date as a Unix epoch timestamp (seconds since
17181970). As with <code>--raw</code>, this is always in UTC and therefore <code>-local</code>
1719has no effect.</p>
1720</div>
1721<div class="paragraph">
Junio C Hamanodc392382024-10-11 18:57:291722<p><code>--date=format:..</code>. feeds the format ... to your system <code>strftime</code>,
Junio C Hamanob96f40a2024-08-01 00:57:251723except for %s, %z, and %Z, which are handled internally.
Junio C Hamanodc392382024-10-11 18:57:291724Use <code>--date=format:</code>%c to show the date in your system locale&#8217;s
Junio C Hamanob96f40a2024-08-01 00:57:251725preferred format. See the <code>strftime</code> manual for a complete list of
1726format placeholders. When using <code>-local</code>, the correct syntax is
Junio C Hamanodc392382024-10-11 18:57:291727<code>--date=format-local:..</code>..</p>
Junio C Hamanob96f40a2024-08-01 00:57:251728</div>
1729<div class="paragraph">
1730<p><code>--date=default</code> is the default format, and is based on ctime(3)
1731output. It shows a single line with three-letter day of the week,
1732three-letter month, day-of-month, hour-minute-seconds in "HH:MM:SS"
1733format, followed by 4-digit year, plus timezone information, unless
Junio C Hamanodc392382024-10-11 18:57:291734the local time zone is used, e.g. <code>Thu</code> <code>Jan</code> <code>1</code> <code>00:00:00</code> <code>1970</code> <code>+0000</code>.</p>
Junio C Hamanob96f40a2024-08-01 00:57:251735</div>
1736</div>
1737</div>
1738</dd>
1739<dt class="hdlist1">--parents</dt>
1740<dd>
1741<p>Print also the parents of the commit (in the form "commit parent&#8230;&#8203;").
1742Also enables parent rewriting, see <em>History Simplification</em> above.</p>
1743</dd>
1744<dt class="hdlist1">--children</dt>
1745<dd>
1746<p>Print also the children of the commit (in the form "commit child&#8230;&#8203;").
1747Also enables parent rewriting, see <em>History Simplification</em> above.</p>
1748</dd>
1749<dt class="hdlist1">--left-right</dt>
1750<dd>
1751<p>Mark which side of a symmetric difference a commit is reachable from.
Junio C Hamanodc392382024-10-11 18:57:291752Commits from the left side are prefixed with &lt; and those from
1753the right with &gt;. If combined with <code>--boundary</code>, those
Junio C Hamanob96f40a2024-08-01 00:57:251754commits are prefixed with <code>-</code>.</p>
1755<div class="paragraph">
1756<p>For example, if you have this topology:</p>
1757</div>
1758<div class="listingblock">
1759<div class="content">
1760<pre> y---b---b branch B
1761 / \ /
1762 / .
1763 / / \
1764 o---x---a---a branch A</pre>
1765</div>
1766</div>
1767<div class="paragraph">
1768<p>you would get an output like this:</p>
1769</div>
1770<div class="listingblock">
1771<div class="content">
1772<pre> $ git rev-list --left-right --boundary --pretty=oneline A...B
1773
1774 &gt;bbbbbbb... 3rd on b
1775 &gt;bbbbbbb... 2nd on b
1776 &lt;aaaaaaa... 3rd on a
1777 &lt;aaaaaaa... 2nd on a
1778 -yyyyyyy... 1st on b
1779 -xxxxxxx... 1st on a</pre>
1780</div>
1781</div>
1782</dd>
1783<dt class="hdlist1">--graph</dt>
1784<dd>
1785<p>Draw a text-based graphical representation of the commit history
1786on the left hand side of the output. This may cause extra lines
1787to be printed in between commits, in order for the graph history
1788to be drawn properly.
1789Cannot be combined with <code>--no-walk</code>.</p>
1790<div class="paragraph">
1791<p>This enables parent rewriting, see <em>History Simplification</em> above.</p>
1792</div>
1793<div class="paragraph">
1794<p>This implies the <code>--topo-order</code> option by default, but the
1795<code>--date-order</code> option may also be specified.</p>
1796</div>
1797</dd>
1798<dt class="hdlist1">--show-linear-break[=&lt;barrier&gt;]</dt>
1799<dd>
1800<p>When --graph is not used, all history branches are flattened
1801which can make it hard to see that the two consecutive commits
1802do not belong to a linear branch. This option puts a barrier
Junio C Hamanodc392382024-10-11 18:57:291803in between them in that case. If <em>&lt;barrier&gt;</em> is specified, it
Junio C Hamanob96f40a2024-08-01 00:57:251804is the string that will be shown instead of the default one.</p>
1805</dd>
1806</dl>
1807</div>
1808</div>
1809</div>
1810</div>
1811<div class="sect1">
1812<h2 id="_output">OUTPUT</h2>
1813<div class="sectionbody">
1814<div class="paragraph">
1815<p>When there are no conflicts, the output of this command is usable as
Junio C Hamanodc392382024-10-11 18:57:291816input to <code>git</code> <code>update-ref</code> <code>--stdin</code>. It is of the form:</p>
Junio C Hamanob96f40a2024-08-01 00:57:251817</div>
1818<div class="literalblock">
1819<div class="content">
1820<pre>update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH}
1821update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH}
1822update refs/heads/branch3 ${NEW_branch3_HASH} ${OLD_branch3_HASH}</pre>
1823</div>
1824</div>
1825<div class="paragraph">
1826<p>where the number of refs updated depends on the arguments passed and
1827the shape of the history being replayed. When using <code>--advance</code>, the
1828number of refs updated is always one, but for <code>--onto</code>, it can be one
1829or more (rebasing multiple branches simultaneously is supported).</p>
1830</div>
1831</div>
1832</div>
1833<div class="sect1">
1834<h2 id="_exit_status">EXIT STATUS</h2>
1835<div class="sectionbody">
1836<div class="paragraph">
1837<p>For a successful, non-conflicted replay, the exit status is 0. When
1838the replay has conflicts, the exit status is 1. If the replay is not
1839able to complete (or start) due to some kind of error, the exit status
1840is something other than 0 or 1.</p>
1841</div>
1842</div>
1843</div>
1844<div class="sect1">
1845<h2 id="_examples">EXAMPLES</h2>
1846<div class="sectionbody">
1847<div class="paragraph">
1848<p>To simply rebase <code>mybranch</code> onto <code>target</code>:</p>
1849</div>
1850<div class="listingblock">
1851<div class="content">
1852<pre>$ git replay --onto target origin/main..mybranch
1853update refs/heads/mybranch ${NEW_mybranch_HASH} ${OLD_mybranch_HASH}</pre>
1854</div>
1855</div>
1856<div class="paragraph">
1857<p>To cherry-pick the commits from mybranch onto target:</p>
1858</div>
1859<div class="listingblock">
1860<div class="content">
1861<pre>$ git replay --advance target origin/main..mybranch
1862update refs/heads/target ${NEW_target_HASH} ${OLD_target_HASH}</pre>
1863</div>
1864</div>
1865<div class="paragraph">
1866<p>Note that the first two examples replay the exact same commits and on
1867top of the exact same new base, they only differ in that the first
1868provides instructions to make mybranch point at the new commits and
1869the second provides instructions to make target point at them.</p>
1870</div>
1871<div class="paragraph">
1872<p>What if you have a stack of branches, one depending upon another, and
1873you&#8217;d really like to rebase the whole set?</p>
1874</div>
1875<div class="listingblock">
1876<div class="content">
1877<pre>$ git replay --contained --onto origin/main origin/main..tipbranch
1878update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH}
1879update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH}
1880update refs/heads/tipbranch ${NEW_tipbranch_HASH} ${OLD_tipbranch_HASH}</pre>
1881</div>
1882</div>
1883<div class="paragraph">
Junio C Hamanodc392382024-10-11 18:57:291884<p>When calling <code>git</code> <code>replay</code>, one does not need to specify a range of
1885commits to replay using the syntax <code>A</code><code>..</code><code>B</code>; any range expression will
Junio C Hamanob96f40a2024-08-01 00:57:251886do:</p>
1887</div>
1888<div class="listingblock">
1889<div class="content">
1890<pre>$ git replay --onto origin/main ^base branch1 branch2 branch3
1891update refs/heads/branch1 ${NEW_branch1_HASH} ${OLD_branch1_HASH}
1892update refs/heads/branch2 ${NEW_branch2_HASH} ${OLD_branch2_HASH}
1893update refs/heads/branch3 ${NEW_branch3_HASH} ${OLD_branch3_HASH}</pre>
1894</div>
1895</div>
1896<div class="paragraph">
1897<p>This will simultaneously rebase <code>branch1</code>, <code>branch2</code>, and <code>branch3</code>,
1898all commits they have since <code>base</code>, playing them on top of
1899<code>origin/main</code>. These three branches may have commits on top of <code>base</code>
1900that they have in common, but that does not need to be the case.</p>
1901</div>
1902</div>
1903</div>
1904<div class="sect1">
1905<h2 id="_git">GIT</h2>
1906<div class="sectionbody">
1907<div class="paragraph">
1908<p>Part of the <a href="git.html">git(1)</a> suite</p>
1909</div>
1910</div>
1911</div>
1912</div>
1913<div id="footer">
1914<div id="footer-text">
Junio C Hamanod6a33e42025-02-18 23:45:111915Last updated 2025-02-14 21:38:14 -0800
Junio C Hamanob96f40a2024-08-01 00:57:251916</div>
1917</div>
1918</body>
1919</html>