Autogenerated HTML docs for v2.47.0-288-g090d2
[git-htmldocs.git] / git-merge.html
blob2190c57996b688a6b9f229076af62f681957ad64
1 <!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"/>
7 <meta name="generator" content="Asciidoctor 2.0.20"/>
8 <title>git-merge(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"; */
14 html{font-family:sans-serif;-webkit-text-size-adjust:100%}
15 a{background:none}
16 a:focus{outline:thin dotted}
17 a:active,a:hover{outline:0}
18 h1{font-size:2em;margin:.67em 0}
19 b,strong{font-weight:bold}
20 abbr{font-size:.9em}
21 abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
22 dfn{font-style:italic}
23 hr{height:0}
24 mark{background:#ff0;color:#000}
25 code,kbd,pre,samp{font-family:monospace;font-size:1em}
26 pre{white-space:pre-wrap}
27 q{quotes:"\201C" "\201D" "\2018" "\2019"}
28 small{font-size:80%}
29 sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
30 sup{top:-.5em}
31 sub{bottom:-.25em}
32 img{border:0}
33 svg:not(:root){overflow:hidden}
34 figure{margin:0}
35 audio,video{display:inline-block}
36 audio:not([controls]){display:none;height:0}
37 fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
38 legend{border:0;padding:0}
39 button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
40 button,input{line-height:normal}
41 button,select{text-transform:none}
42 button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
43 button[disabled],html input[disabled]{cursor:default}
44 input[type=checkbox],input[type=radio]{padding:0}
45 button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
46 textarea{overflow:auto;vertical-align:top}
47 table{border-collapse:collapse;border-spacing:0}
48 *,::before,::after{box-sizing:border-box}
49 html,body{font-size:100%}
50 body{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}
51 a:hover{cursor:pointer}
52 img,object,embed{max-width:100%;height:auto}
53 object,embed{height:100%}
54 img{-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}
62 img,object,svg{display:inline-block;vertical-align:middle}
63 textarea{height:auto;min-height:50px}
64 select{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}
66 div,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}
67 a{color:#2156a5;text-decoration:underline;line-height:inherit}
68 a:hover,a:focus{color:#1d4b8f}
69 a img{border:0}
70 p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
71 p aside{font-size:.875em;line-height:1.35;font-style:italic}
72 h1,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}
73 h1 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}
74 h1{font-size:2.125em}
75 h2{font-size:1.6875em}
76 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
77 h4,h5{font-size:1.125em}
78 h6{font-size:1em}
79 hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
80 em,i{font-style:italic;line-height:inherit}
81 strong,b{font-weight:bold;line-height:inherit}
82 small{font-size:60%;line-height:inherit}
83 code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
84 ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
85 ul,ol{margin-left:1.5em}
86 ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
87 ul.circle{list-style-type:circle}
88 ul.disc{list-style-type:disc}
89 ul.square{list-style-type:square}
90 ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
91 ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
92 dl dt{margin-bottom:.3125em;font-weight:bold}
93 dl dd{margin-bottom:1.25em}
94 blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
95 blockquote,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}
97 h1{font-size:2.75em}
98 h2{font-size:2.3125em}
99 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
100 h4{font-size:1.4375em}}
101 table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
102 table thead,table tfoot{background:#f7f8f7}
103 table 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}
104 table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
105 table tr.even,table tr.alt{background:#f8f8f7}
106 table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
107 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
108 h1 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}
117 pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
118 pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
119 pre>code{display:block}
120 pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
121 em em{font-style:normal}
122 strong strong{font-weight:400}
123 .keyseq{color:rgba(51,51,51,.8)}
124 kbd{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}
132 b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
133 b.button::before{content:"[";padding:0 3px 0 2px}
134 b.button::after{content:"]";padding:0 2px 0 3px}
135 p 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}
143 #header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
144 #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}
164 body.toc2{padding-left:15em;padding-right:0}
165 #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}
166 #toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
167 #toc.toc2>ul{font-size:.9em;margin-bottom:0}
168 #toc.toc2 ul ul{margin-left:0;padding-left:1em}
169 #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
170 body.toc2.toc-right{padding-left:0;padding-right:15em}
171 body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
172 @media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
173 #toc.toc2{width:20em}
174 #toc.toc2 #toctitle{font-size:1.375em}
175 #toc.toc2>ul{font-size:.95em}
176 #toc.toc2 ul ul{padding-left:1.25em}
177 body.toc2.toc-right{padding-left:0;padding-right:20em}}
178 #content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
179 #content #toc>:first-child{margin-top:0}
180 #content #toc>:last-child{margin-bottom:0}
181 #footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
182 #footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
183 #content{margin-bottom:.625em}
184 .sect1{padding-bottom:.625em}
185 @media screen and (min-width:768px){#content{margin-bottom:1.25em}
186 .sect1{padding-bottom:1.25em}}
187 .sect1:last-child{padding-bottom:0}
188 .sect1+.sect1{border-top:1px solid #e7e7e9}
189 #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}
190 #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}
191 #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}
192 #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}
193 #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}
194 details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
195 details{margin-left:1.25rem}
196 details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
197 details>summary::-webkit-details-marker{display:none}
198 details>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%)}
199 details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
200 details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
201 .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}
202 table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
203 .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)}
204 .admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
205 .admonitionblock>table td.icon{text-align:center;width:80px}
206 .admonitionblock>table td.icon img{max-width:none}
207 .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
208 .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}
209 .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
210 .exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
211 .sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
212 .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
213 .exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
214 .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}
215 .literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
216 @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
217 @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
218 .literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
219 .literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
220 .listingblock>.content{position:relative}
221 .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}
222 .listingblock:hover code[data-lang]::before{display:block}
223 .listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
224 .listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
225 .listingblock pre.highlightjs{padding:0}
226 .listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
227 .listingblock pre.prettyprint{border-width:0}
228 .prettyprint{background:#f7f7f8}
229 pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
230 pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
231 pre.prettyprint li code[data-lang]::before{opacity:1}
232 pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
233 table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
234 table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
235 table.linenotable td.code{padding-left:.75em}
236 table.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}
237 pre.pygments span.linenos{display:inline-block;margin-right:.75em}
238 .quoteblock{margin:0 1em 1.25em 1.5em;display:table}
239 .quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
240 .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}
241 .quoteblock blockquote{margin:0;padding:0;border:0}
242 .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)}
243 .quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
244 .quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
245 .verseblock{margin:0 1em 1.25em}
246 .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}
247 .verseblock pre strong{font-weight:400}
248 .verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
249 .quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
250 .quoteblock .attribution br,.verseblock .attribution br{display:none}
251 .quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
252 .quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
253 .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}
254 .quoteblock.abstract{margin:0 1em 1.25em;display:block}
255 .quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
256 .quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
257 .quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
258 .quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
259 .quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
260 p.tableblock:last-child{margin-bottom:0}
261 td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
262 td.tableblock>.content>:last-child{margin-bottom:-1.25em}
263 table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
264 table.grid-all>*>tr>*{border-width:1px}
265 table.grid-cols>*>tr>*{border-width:0 1px}
266 table.grid-rows>*>tr>*{border-width:1px 0}
267 table.frame-all{border-width:1px}
268 table.frame-ends{border-width:1px 0}
269 table.frame-sides{border-width:0 1px}
270 table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
271 table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
272 table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
273 table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
274 table.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}
275 th.halign-left,td.halign-left{text-align:left}
276 th.halign-right,td.halign-right{text-align:right}
277 th.halign-center,td.halign-center{text-align:center}
278 th.valign-top,td.valign-top{vertical-align:top}
279 th.valign-bottom,td.valign-bottom{vertical-align:bottom}
280 th.valign-middle,td.valign-middle{vertical-align:middle}
281 table thead th,table tfoot th{font-weight:bold}
282 tbody tr th{background:#f7f8f7}
283 tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
284 p.tableblock>code:only-child{background:none;padding:0}
285 p.tableblock{font-size:1em}
286 ol{margin-left:1.75em}
287 ul li ol{margin-left:1.5em}
288 dl dd{margin-left:1.125em}
289 dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
290 li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
291 ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
292 ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
293 ul.unstyled,ol.unstyled{margin-left:0}
294 li>p:empty:only-child::before{content:"";display:inline-block}
295 ul.checklist>li>p:first-child{margin-left:-1em}
296 ul.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}
297 ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
298 ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
299 ul.inline>li{margin-left:1.25em}
300 .unstyled dl dt{font-weight:400;font-style:normal}
301 ol.arabic{list-style-type:decimal}
302 ol.decimal{list-style-type:decimal-leading-zero}
303 ol.loweralpha{list-style-type:lower-alpha}
304 ol.upperalpha{list-style-type:upper-alpha}
305 ol.lowerroman{list-style-type:lower-roman}
306 ol.upperroman{list-style-type:upper-roman}
307 ol.lowergreek{list-style-type:lower-greek}
308 .hdlist>table,.colist>table{border:0;background:none}
309 .hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
310 td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
311 td.hdlist1{font-weight:bold;padding-bottom:1.25em}
312 td.hdlist2{word-wrap:anywhere}
313 .literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
314 .colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
315 .colist td:not([class]):first-child img{max-width:none}
316 .colist td:not([class]):last-child{padding:.25em 0}
317 .thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
318 .imageblock.left{margin:.25em .625em 1.25em 0}
319 .imageblock.right{margin:.25em 0 1.25em .625em}
320 .imageblock>.title{margin-bottom:0}
321 .imageblock.thumb,.imageblock.th{border-width:6px}
322 .imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
323 .image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
324 .image.left{margin-right:.625em}
325 .image.right{margin-left:.625em}
326 a.image{text-decoration:none;display:inline-block}
327 a.image object{pointer-events:none}
328 sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
329 sup.footnote a,sup.footnoteref a{text-decoration:none}
330 sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
331 #footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
332 #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
333 #footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
334 #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
335 #footnotes .footnote:last-of-type{margin-bottom:0}
336 #content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
337 div.unbreakable{page-break-inside:avoid}
338 .big{font-size:larger}
339 .small{font-size:smaller}
340 .underline{text-decoration:underline}
341 .overline{text-decoration:overline}
342 .line-through{text-decoration:line-through}
343 .aqua{color:#00bfbf}
344 .aqua-background{background:#00fafa}
345 .black{color:#000}
346 .black-background{background:#000}
347 .blue{color:#0000bf}
348 .blue-background{background:#0000fa}
349 .fuchsia{color:#bf00bf}
350 .fuchsia-background{background:#fa00fa}
351 .gray{color:#606060}
352 .gray-background{background:#7d7d7d}
353 .green{color:#006000}
354 .green-background{background:#007d00}
355 .lime{color:#00bf00}
356 .lime-background{background:#00fa00}
357 .maroon{color:#600000}
358 .maroon-background{background:#7d0000}
359 .navy{color:#000060}
360 .navy-background{background:#00007d}
361 .olive{color:#606000}
362 .olive-background{background:#7d7d00}
363 .purple{color:#600060}
364 .purple-background{background:#7d007d}
365 .red{color:#bf0000}
366 .red-background{background:#fa0000}
367 .silver{color:#909090}
368 .silver-background{background:#bcbcbc}
369 .teal{color:#006060}
370 .teal-background{background:#007d7d}
371 .white{color:#bfbfbf}
372 .white-background{background:#fafafa}
373 .yellow{color:#bfbf00}
374 .yellow-background{background:#fafa00}
375 span.icon>.fa{cursor:default}
376 a span.icon>.fa{cursor:inherit}
377 .admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
378 .admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
379 .admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
380 .admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
381 .admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
382 .admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
383 .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}
384 .conum[data-value] *{color:#fff!important}
385 .conum[data-value]+b{display:none}
386 .conum[data-value]::after{content:attr(data-value)}
387 pre .conum[data-value]{position:relative;top:-.125em}
388 b.conum *{color:inherit!important}
389 .conum:not([data-value]):empty{display:none}
390 dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
391 h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
392 p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
393 p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
394 p{margin-bottom:1.25rem}
395 .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
396 .exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
397 .print-only{display:none!important}
398 @page{margin:1.25cm .75cm}
399 @media print{*{box-shadow:none!important;text-shadow:none!important}
400 html{font-size:80%}
401 a{color:inherit!important;text-decoration:underline!important}
402 a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
403 a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
404 abbr[title]{border-bottom:1px dotted}
405 abbr[title]::after{content:" (" attr(title) ")"}
406 pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
407 thead{display:table-header-group}
408 svg{max-width:100%}
409 p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
410 h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
411 #header,#content,#footnotes,#footer{max-width:none}
412 #toc,.sidebarblock,.exampleblock>.content{background:none!important}
413 #toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
414 body.book #header{text-align:center}
415 body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
416 body.book #header .details{border:0!important;display:block;padding:0!important}
417 body.book #header .details span:first-child{margin-left:0!important}
418 body.book #header .details br{display:block}
419 body.book #header .details br+span::before{content:none!important}
420 body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
421 body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
422 .listingblock code[data-lang]::before{display:block}
423 #footer{padding:0 .9375em}
424 .hide-on-print{display:none!important}
425 .print-only{display:block!important}
426 .hide-for-print{display:none!important}
427 .show-for-print{display:inherit!important}}
428 @media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
429 .sect1{padding:0!important}
430 .sect1+.sect1{border:0}
431 #footer{background:none}
432 #footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
433 @media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
434 </style>
435 <style>
436 pre>code {
437 display: inline;
439 </style>
440 </head>
441 <body class="manpage">
442 <div id="header">
443 <h1>git-merge(1) Manual Page</h1>
444 <h2 id="_name">NAME</h2>
445 <div class="sectionbody">
446 <p>git-merge - Join two or more development histories together</p>
447 </div>
448 </div>
449 <div id="content">
450 <div class="sect1">
451 <h2 id="_synopsis">SYNOPSIS</h2>
452 <div class="sectionbody">
453 <div class="verseblock">
454 <pre class="content"><em>git merge</em> [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
455 [--no-verify] [-s &lt;strategy&gt;] [-X &lt;strategy-option&gt;] [-S[&lt;keyid&gt;]]
456 [--[no-]allow-unrelated-histories]
457 [--[no-]rerere-autoupdate] [-m &lt;msg&gt;] [-F &lt;file&gt;]
458 [--into-name &lt;branch&gt;] [&lt;commit&gt;&#8230;&#8203;]
459 <em>git merge</em> (--continue | --abort | --quit)</pre>
460 </div>
461 </div>
462 </div>
463 <div class="sect1">
464 <h2 id="_description">DESCRIPTION</h2>
465 <div class="sectionbody">
466 <div class="paragraph">
467 <p>Incorporates changes from the named commits (since the time their
468 histories diverged from the current branch) into the current
469 branch. This command is used by <code>git</code> <code>pull</code> to incorporate changes
470 from another repository and can be used by hand to merge changes
471 from one branch into another.</p>
472 </div>
473 <div class="paragraph">
474 <p>Assume the following history exists and the current branch is
475 <code>master</code>:</p>
476 </div>
477 <div class="listingblock">
478 <div class="content">
479 <pre> A---B---C topic
481 D---E---F---G master</pre>
482 </div>
483 </div>
484 <div class="paragraph">
485 <p>Then <code>git</code> <code>merge</code> <code>topic</code> will replay the changes made on the
486 <code>topic</code> branch since it diverged from <code>master</code> (i.e., <code>E</code>) until
487 its current commit (<code>C</code>) on top of <code>master</code>, and record the result
488 in a new commit along with the names of the two parent commits and
489 a log message from the user describing the changes. Before the operation,
490 <code>ORIG_HEAD</code> is set to the tip of the current branch (<code>C</code>).</p>
491 </div>
492 <div class="listingblock">
493 <div class="content">
494 <pre> A---B---C topic
496 D---E---F---G---H master</pre>
497 </div>
498 </div>
499 <div class="paragraph">
500 <p>A merge stops if there&#8217;s a conflict that cannot be resolved
501 automatically or if <code>--no-commit</code> was provided when initiating the
502 merge. At that point you can run <code>git</code> <code>merge</code> <code>--abort</code> or <code>git</code> <code>merge</code>
503 <code>--continue</code>.</p>
504 </div>
505 <div class="paragraph">
506 <p><code>git</code> <code>merge</code> <code>--abort</code> will abort the merge process and try to reconstruct
507 the pre-merge state. However, if there were uncommitted changes when the
508 merge started (and especially if those changes were further modified
509 after the merge was started), <code>git</code> <code>merge</code> <code>--abort</code> will in some cases be
510 unable to reconstruct the original (pre-merge) changes. Therefore:</p>
511 </div>
512 <div class="paragraph">
513 <p><strong>Warning</strong>: Running <code>git</code> <code>merge</code> with non-trivial uncommitted changes is
514 discouraged: while possible, it may leave you in a state that is hard to
515 back out of in the case of a conflict.</p>
516 </div>
517 </div>
518 </div>
519 <div class="sect1">
520 <h2 id="_options">OPTIONS</h2>
521 <div class="sectionbody">
522 <div class="dlist">
523 <dl>
524 <dt class="hdlist1">--commit</dt>
525 <dt class="hdlist1">--no-commit</dt>
526 <dd>
527 <p>Perform the merge and commit the result. This option can
528 be used to override --no-commit.</p>
529 <div class="paragraph">
530 <p>With --no-commit perform the merge and stop just before creating
531 a merge commit, to give the user a chance to inspect and further
532 tweak the merge result before committing.</p>
533 </div>
534 <div class="paragraph">
535 <p>Note that fast-forward updates do not create a merge commit and
536 therefore there is no way to stop those merges with --no-commit.
537 Thus, if you want to ensure your branch is not changed or updated
538 by the merge command, use --no-ff with --no-commit.</p>
539 </div>
540 </dd>
541 <dt class="hdlist1">--edit</dt>
542 <dt class="hdlist1">-e</dt>
543 <dt class="hdlist1">--no-edit</dt>
544 <dd>
545 <p> Invoke an editor before committing successful mechanical merge to
546 further edit the auto-generated merge message, so that the user
547 can explain and justify the merge. The <code>--no-edit</code> option can be
548 used to accept the auto-generated message (this is generally
549 discouraged).
550 The <code>--edit</code> (or <code>-e</code>) option is still useful if you are
551 giving a draft message with the <code>-m</code> option from the command line
552 and want to edit it in the editor.</p>
553 <div class="paragraph">
554 <p>Older scripts may depend on the historical behaviour of not allowing the
555 user to edit the merge log message. They will see an editor opened when
556 they run <code>git</code> <code>merge</code>. To make it easier to adjust such scripts to the
557 updated behaviour, the environment variable <code>GIT_MERGE_AUTOEDIT</code> can be
558 set to <code>no</code> at the beginning of them.</p>
559 </div>
560 </dd>
561 <dt class="hdlist1">--cleanup=&lt;mode&gt;</dt>
562 <dd>
563 <p>This option determines how the merge message will be cleaned up before
564 committing. See <a href="git-commit.html">git-commit(1)</a> for more details. In addition, if
565 the <em>&lt;mode&gt;</em> is given a value of <code>scissors</code>, scissors will be appended
566 to <code>MERGE_MSG</code> before being passed on to the commit machinery in the
567 case of a merge conflict.</p>
568 </dd>
569 <dt class="hdlist1">--ff</dt>
570 <dt class="hdlist1">--no-ff</dt>
571 <dt class="hdlist1">--ff-only</dt>
572 <dd>
573 <p>Specifies how a merge is handled when the merged-in history is
574 already a descendant of the current history. <code>--ff</code> is the
575 default unless merging an annotated (and possibly signed) tag
576 that is not stored in its natural place in the <code>refs/tags/</code>
577 hierarchy, in which case <code>--no-ff</code> is assumed.</p>
578 <div class="paragraph">
579 <p>With <code>--ff</code>, when possible resolve the merge as a fast-forward (only
580 update the branch pointer to match the merged branch; do not create a
581 merge commit). When not possible (when the merged-in history is not a
582 descendant of the current history), create a merge commit.</p>
583 </div>
584 <div class="paragraph">
585 <p>With <code>--no-ff</code>, create a merge commit in all cases, even when the merge
586 could instead be resolved as a fast-forward.</p>
587 </div>
588 <div class="paragraph">
589 <p>With <code>--ff-only</code>, resolve the merge as a fast-forward when possible.
590 When not possible, refuse to merge and exit with a non-zero status.</p>
591 </div>
592 </dd>
593 <dt class="hdlist1">-S[&lt;keyid&gt;]</dt>
594 <dt class="hdlist1">--gpg-sign[=&lt;keyid&gt;]</dt>
595 <dt class="hdlist1">--no-gpg-sign</dt>
596 <dd>
597 <p>GPG-sign the resulting merge commit. The <code>keyid</code> argument is
598 optional and defaults to the committer identity; if specified,
599 it must be stuck to the option without a space. <code>--no-gpg-sign</code>
600 is useful to countermand both <code>commit.gpgSign</code> configuration variable,
601 and earlier <code>--gpg-sign</code>.</p>
602 </dd>
603 <dt class="hdlist1">--log[=&lt;n&gt;]</dt>
604 <dt class="hdlist1">--no-log</dt>
605 <dd>
606 <p>In addition to branch names, populate the log message with
607 one-line descriptions from at most &lt;n&gt; actual commits that are being
608 merged. See also <a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>.</p>
609 <div class="paragraph">
610 <p>With --no-log do not list one-line descriptions from the
611 actual commits being merged.</p>
612 </div>
613 </dd>
614 <dt class="hdlist1">--signoff</dt>
615 <dt class="hdlist1">--no-signoff</dt>
616 <dd>
617 <p>Add a <code>Signed-off-by</code> trailer by the committer at the end of the commit
618 log message. The meaning of a signoff depends on the project
619 to which you&#8217;re committing. For example, it may certify that
620 the committer has the rights to submit the work under the
621 project&#8217;s license or agrees to some contributor representation,
622 such as a Developer Certificate of Origin.
623 (See <a href="https://developercertificate.org" class="bare">https://developercertificate.org</a> for the one used by the
624 Linux kernel and Git projects.) Consult the documentation or
625 leadership of the project to which you&#8217;re contributing to
626 understand how the signoffs are used in that project.</p>
627 <div class="paragraph">
628 <p>The --no-signoff option can be used to countermand an earlier --signoff
629 option on the command line.</p>
630 </div>
631 </dd>
632 <dt class="hdlist1">--stat</dt>
633 <dt class="hdlist1">-n</dt>
634 <dt class="hdlist1">--no-stat</dt>
635 <dd>
636 <p>Show a diffstat at the end of the merge. The diffstat is also
637 controlled by the configuration option merge.stat.</p>
638 <div class="paragraph">
639 <p>With -n or --no-stat do not show a diffstat at the end of the
640 merge.</p>
641 </div>
642 </dd>
643 <dt class="hdlist1">--squash</dt>
644 <dt class="hdlist1">--no-squash</dt>
645 <dd>
646 <p>Produce the working tree and index state as if a real merge
647 happened (except for the merge information), but do not actually
648 make a commit, move the <code>HEAD</code>, or record <code>$GIT_DIR/MERGE_HEAD</code>
649 (to cause the next <code>git</code> <code>commit</code> command to create a merge
650 commit). This allows you to create a single commit on top of
651 the current branch whose effect is the same as merging another
652 branch (or more in case of an octopus).</p>
653 <div class="paragraph">
654 <p>With --no-squash perform the merge and commit the result. This
655 option can be used to override --squash.</p>
656 </div>
657 <div class="paragraph">
658 <p>With --squash, --commit is not allowed, and will fail.</p>
659 </div>
660 </dd>
661 <dt class="hdlist1">--[no-]verify</dt>
662 <dd>
663 <p>By default, the pre-merge and commit-msg hooks are run.
664 When <code>--no-verify</code> is given, these are bypassed.
665 See also <a href="githooks.html">githooks(5)</a>.</p>
666 </dd>
667 <dt class="hdlist1">-s &lt;strategy&gt;</dt>
668 <dt class="hdlist1">--strategy=&lt;strategy&gt;</dt>
669 <dd>
670 <p>Use the given merge strategy; can be supplied more than
671 once to specify them in the order they should be tried.
672 If there is no <code>-s</code> option, a built-in list of strategies
673 is used instead (<code>ort</code> when merging a single head,
674 <code>octopus</code> otherwise).</p>
675 </dd>
676 <dt class="hdlist1">-X &lt;option&gt;</dt>
677 <dt class="hdlist1">--strategy-option=&lt;option&gt;</dt>
678 <dd>
679 <p>Pass merge strategy specific option through to the merge
680 strategy.</p>
681 </dd>
682 <dt class="hdlist1">--verify-signatures</dt>
683 <dt class="hdlist1">--no-verify-signatures</dt>
684 <dd>
685 <p>Verify that the tip commit of the side branch being merged is
686 signed with a valid key, i.e. a key that has a valid uid: in the
687 default trust model, this means the signing key has been signed by
688 a trusted key. If the tip commit of the side branch is not signed
689 with a valid key, the merge is aborted.</p>
690 </dd>
691 <dt class="hdlist1">--summary</dt>
692 <dt class="hdlist1">--no-summary</dt>
693 <dd>
694 <p>Synonyms to --stat and --no-stat; these are deprecated and will be
695 removed in the future.</p>
696 </dd>
697 <dt class="hdlist1">-q</dt>
698 <dt class="hdlist1">--quiet</dt>
699 <dd>
700 <p>Operate quietly. Implies --no-progress.</p>
701 </dd>
702 <dt class="hdlist1">-v</dt>
703 <dt class="hdlist1">--verbose</dt>
704 <dd>
705 <p>Be verbose.</p>
706 </dd>
707 <dt class="hdlist1">--progress</dt>
708 <dt class="hdlist1">--no-progress</dt>
709 <dd>
710 <p>Turn progress on/off explicitly. If neither is specified,
711 progress is shown if standard error is connected to a terminal.
712 Note that not all merge strategies may support progress
713 reporting.</p>
714 </dd>
715 <dt class="hdlist1">--autostash</dt>
716 <dt class="hdlist1">--no-autostash</dt>
717 <dd>
718 <p>Automatically create a temporary stash entry before the operation
719 begins, record it in the ref <code>MERGE_AUTOSTASH</code>
720 and apply it after the operation ends. This means
721 that you can run the operation on a dirty worktree. However, use
722 with care: the final stash application after a successful
723 merge might result in non-trivial conflicts.</p>
724 </dd>
725 <dt class="hdlist1">--allow-unrelated-histories</dt>
726 <dd>
727 <p>By default, <code>git</code> <code>merge</code> command refuses to merge histories
728 that do not share a common ancestor. This option can be
729 used to override this safety when merging histories of two
730 projects that started their lives independently. As that is
731 a very rare occasion, no configuration variable to enable
732 this by default exists and will not be added.</p>
733 </dd>
734 <dt class="hdlist1">-m &lt;msg&gt;</dt>
735 <dd>
736 <p>Set the commit message to be used for the merge commit (in
737 case one is created).</p>
738 <div class="paragraph">
739 <p>If <code>--log</code> is specified, a shortlog of the commits being merged
740 will be appended to the specified message.</p>
741 </div>
742 <div class="paragraph">
743 <p>The <code>git</code> <code>fmt-merge-msg</code> command can be
744 used to give a good default for automated <code>git</code> <code>merge</code>
745 invocations. The automated message can include the branch description.</p>
746 </div>
747 </dd>
748 <dt class="hdlist1">--into-name &lt;branch&gt;</dt>
749 <dd>
750 <p>Prepare the default merge message as if merging to the branch
751 <em>&lt;branch&gt;</em>, instead of the name of the real branch to which
752 the merge is made.</p>
753 </dd>
754 <dt class="hdlist1">-F &lt;file&gt;</dt>
755 <dt class="hdlist1">--file=&lt;file&gt;</dt>
756 <dd>
757 <p>Read the commit message to be used for the merge commit (in
758 case one is created).</p>
759 <div class="paragraph">
760 <p>If <code>--log</code> is specified, a shortlog of the commits being merged
761 will be appended to the specified message.</p>
762 </div>
763 </dd>
764 <dt class="hdlist1">--rerere-autoupdate</dt>
765 <dt class="hdlist1">--no-rerere-autoupdate</dt>
766 <dd>
767 <p>After the rerere mechanism reuses a recorded resolution on
768 the current conflict to update the files in the working
769 tree, allow it to also update the index with the result of
770 resolution. <code>--no-rerere-autoupdate</code> is a good way to
771 double-check what <code>rerere</code> did and catch potential
772 mismerges, before committing the result to the index with a
773 separate <code>git</code> <code>add</code>.</p>
774 </dd>
775 <dt class="hdlist1">--overwrite-ignore</dt>
776 <dt class="hdlist1">--no-overwrite-ignore</dt>
777 <dd>
778 <p>Silently overwrite ignored files from the merge result. This
779 is the default behavior. Use <code>--no-overwrite-ignore</code> to abort.</p>
780 </dd>
781 <dt class="hdlist1">--abort</dt>
782 <dd>
783 <p>Abort the current conflict resolution process, and
784 try to reconstruct the pre-merge state. If an autostash entry is
785 present, apply it to the worktree.</p>
786 <div class="paragraph">
787 <p>If there were uncommitted worktree changes present when the merge
788 started, <code>git</code> <code>merge</code> <code>--abort</code> will in some cases be unable to
789 reconstruct these changes. It is therefore recommended to always
790 commit or stash your changes before running <code>git</code> <code>merge</code>.</p>
791 </div>
792 <div class="paragraph">
793 <p><code>git</code> <code>merge</code> <code>--abort</code> is equivalent to <code>git</code> <code>reset</code> <code>--merge</code> when
794 <code>MERGE_HEAD</code> is present unless <code>MERGE_AUTOSTASH</code> is also present in
795 which case <code>git</code> <code>merge</code> <code>--abort</code> applies the stash entry to the worktree
796 whereas <code>git</code> <code>reset</code> <code>--merge</code> will save the stashed changes in the stash
797 list.</p>
798 </div>
799 </dd>
800 <dt class="hdlist1">--quit</dt>
801 <dd>
802 <p>Forget about the current merge in progress. Leave the index
803 and the working tree as-is. If <code>MERGE_AUTOSTASH</code> is present, the
804 stash entry will be saved to the stash list.</p>
805 </dd>
806 <dt class="hdlist1">--continue</dt>
807 <dd>
808 <p>After a <code>git</code> <code>merge</code> stops due to conflicts you can conclude the
809 merge by running <code>git</code> <code>merge</code> <code>--continue</code> (see "HOW TO RESOLVE
810 CONFLICTS" section below).</p>
811 </dd>
812 <dt class="hdlist1">&lt;commit&gt;&#8230;&#8203;</dt>
813 <dd>
814 <p>Commits, usually other branch heads, to merge into our branch.
815 Specifying more than one commit will create a merge with
816 more than two parents (affectionately called an Octopus merge).</p>
817 <div class="paragraph">
818 <p>If no commit is given from the command line, merge the remote-tracking
819 branches that the current branch is configured to use as its upstream.
820 See also the configuration section of this manual page.</p>
821 </div>
822 <div class="paragraph">
823 <p>When <code>FETCH_HEAD</code> (and no other commit) is specified, the branches
824 recorded in the .<code>git/FETCH_HEAD</code> file by the previous invocation
825 of <code>git</code> <code>fetch</code> for merging are merged to the current branch.</p>
826 </div>
827 </dd>
828 </dl>
829 </div>
830 </div>
831 </div>
832 <div class="sect1">
833 <h2 id="_pre_merge_checks">PRE-MERGE CHECKS</h2>
834 <div class="sectionbody">
835 <div class="paragraph">
836 <p>Before applying outside changes, you should get your own work in
837 good shape and committed locally, so it will not be clobbered if
838 there are conflicts. See also <a href="git-stash.html">git-stash(1)</a>.
839 <code>git</code> <code>pull</code> and <code>git</code> <code>merge</code> will stop without doing anything when
840 local uncommitted changes overlap with files that <code>git</code> <code>pull</code>/<code>git</code>
841 <code>merge</code> may need to update.</p>
842 </div>
843 <div class="paragraph">
844 <p>To avoid recording unrelated changes in the merge commit,
845 <code>git</code> <code>pull</code> and <code>git</code> <code>merge</code> will also abort if there are any changes
846 registered in the index relative to the <code>HEAD</code> commit. (Special
847 narrow exceptions to this rule may exist depending on which merge
848 strategy is in use, but generally, the index must match HEAD.)</p>
849 </div>
850 <div class="paragraph">
851 <p>If all named commits are already ancestors of <code>HEAD</code>, <code>git</code> <code>merge</code>
852 will exit early with the message "Already up to date."</p>
853 </div>
854 </div>
855 </div>
856 <div class="sect1">
857 <h2 id="_fast_forward_merge">FAST-FORWARD MERGE</h2>
858 <div class="sectionbody">
859 <div class="paragraph">
860 <p>Often the current branch head is an ancestor of the named commit.
861 This is the most common case especially when invoked from <code>git</code>
862 <code>pull</code>: you are tracking an upstream repository, you have committed
863 no local changes, and now you want to update to a newer upstream
864 revision. In this case, a new commit is not needed to store the
865 combined history; instead, the <code>HEAD</code> (along with the index) is
866 updated to point at the named commit, without creating an extra
867 merge commit.</p>
868 </div>
869 <div class="paragraph">
870 <p>This behavior can be suppressed with the <code>--no-ff</code> option.</p>
871 </div>
872 </div>
873 </div>
874 <div class="sect1">
875 <h2 id="_true_merge">TRUE MERGE</h2>
876 <div class="sectionbody">
877 <div class="paragraph">
878 <p>Except in a fast-forward merge (see above), the branches to be
879 merged must be tied together by a merge commit that has both of them
880 as its parents.</p>
881 </div>
882 <div class="paragraph">
883 <p>A merged version reconciling the changes from all branches to be
884 merged is committed, and your <code>HEAD</code>, index, and working tree are
885 updated to it. It is possible to have modifications in the working
886 tree as long as they do not overlap; the update will preserve them.</p>
887 </div>
888 <div class="paragraph">
889 <p>When it is not obvious how to reconcile the changes, the following
890 happens:</p>
891 </div>
892 <div class="olist arabic">
893 <ol class="arabic">
894 <li>
895 <p>The <code>HEAD</code> pointer stays the same.</p>
896 </li>
897 <li>
898 <p>The <code>MERGE_HEAD</code> ref is set to point to the other branch head.</p>
899 </li>
900 <li>
901 <p>Paths that merged cleanly are updated both in the index file and
902 in your working tree.</p>
903 </li>
904 <li>
905 <p>For conflicting paths, the index file records up to three
906 versions: stage 1 stores the version from the common ancestor,
907 stage 2 from <code>HEAD</code>, and stage 3 from <code>MERGE_HEAD</code> (you
908 can inspect the stages with <code>git</code> <code>ls-files</code> <code>-u</code>). The working
909 tree files contain the result of the merge operation; i.e. 3-way
910 merge results with familiar conflict markers &lt;&lt;&lt; <code>===</code> &gt;&gt;&gt;.</p>
911 </li>
912 <li>
913 <p>A ref named <code>AUTO_MERGE</code> is written, pointing to a tree
914 corresponding to the current content of the working tree (including
915 conflict markers for textual conflicts). Note that this ref is only
916 written when the <em>ort</em> merge strategy is used (the default).</p>
917 </li>
918 <li>
919 <p>No other changes are made. In particular, the local
920 modifications you had before you started merge will stay the
921 same and the index entries for them stay as they were,
922 i.e. matching <code>HEAD</code>.</p>
923 </li>
924 </ol>
925 </div>
926 <div class="paragraph">
927 <p>If you tried a merge which resulted in complex conflicts and
928 want to start over, you can recover with <code>git</code> <code>merge</code> <code>--abort</code>.</p>
929 </div>
930 </div>
931 </div>
932 <div class="sect1">
933 <h2 id="_merging_tag">MERGING TAG</h2>
934 <div class="sectionbody">
935 <div class="paragraph">
936 <p>When merging an annotated (and possibly signed) tag, Git always
937 creates a merge commit even if a fast-forward merge is possible, and
938 the commit message template is prepared with the tag message.
939 Additionally, if the tag is signed, the signature check is reported
940 as a comment in the message template. See also <a href="git-tag.html">git-tag(1)</a>.</p>
941 </div>
942 <div class="paragraph">
943 <p>When you want to just integrate with the work leading to the commit
944 that happens to be tagged, e.g. synchronizing with an upstream
945 release point, you may not want to make an unnecessary merge commit.</p>
946 </div>
947 <div class="paragraph">
948 <p>In such a case, you can "unwrap" the tag yourself before feeding it
949 to <code>git</code> <code>merge</code>, or pass <code>--ff-only</code> when you do not have any work on
950 your own. e.g.</p>
951 </div>
952 <div class="listingblock">
953 <div class="content">
954 <pre>git fetch origin
955 git merge v1.2.3^0
956 git merge --ff-only v1.2.3</pre>
957 </div>
958 </div>
959 </div>
960 </div>
961 <div class="sect1">
962 <h2 id="_how_conflicts_are_presented">HOW CONFLICTS ARE PRESENTED</h2>
963 <div class="sectionbody">
964 <div class="paragraph">
965 <p>During a merge, the working tree files are updated to reflect the result
966 of the merge. Among the changes made to the common ancestor&#8217;s version,
967 non-overlapping ones (that is, you changed an area of the file while the
968 other side left that area intact, or vice versa) are incorporated in the
969 final result verbatim. When both sides made changes to the same area,
970 however, Git cannot randomly pick one side over the other, and asks you to
971 resolve it by leaving what both sides did to that area.</p>
972 </div>
973 <div class="paragraph">
974 <p>By default, Git uses the same style as the one used by the "merge" program
975 from the RCS suite to present such a conflicted hunk, like this:</p>
976 </div>
977 <div class="listingblock">
978 <div class="content">
979 <pre>Here are lines that are either unchanged from the common
980 ancestor, or cleanly resolved because only one side changed,
981 or cleanly resolved because both sides changed the same way.
982 &lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
983 Conflict resolution is hard;
984 let's go shopping.
985 =======
986 Git makes conflict resolution easy.
987 &gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
988 And here is another line that is cleanly resolved or unmodified.</pre>
989 </div>
990 </div>
991 <div class="paragraph">
992 <p>The area where a pair of conflicting changes happened is marked with markers
993 &lt;&lt;&lt;&lt;&lt;&lt;&lt;, <code>=======</code>, and &gt;&gt;&gt;&gt;&gt;&gt;&gt;. The part before the <code>=======</code>
994 is typically your side, and the part afterwards is typically their side.</p>
995 </div>
996 <div class="paragraph">
997 <p>The default format does not show what the original said in the conflicting
998 area. You cannot tell how many lines are deleted and replaced with
999 Barbie&#8217;s remark on your side. The only thing you can tell is that your
1000 side wants to say it is hard and you&#8217;d prefer to go shopping, while the
1001 other side wants to claim it is easy.</p>
1002 </div>
1003 <div class="paragraph">
1004 <p>An alternative style can be used by setting the <code>merge.conflictStyle</code>
1005 configuration variable to either "diff3" or "zdiff3". In "diff3"
1006 style, the above conflict may look like this:</p>
1007 </div>
1008 <div class="listingblock">
1009 <div class="content">
1010 <pre>Here are lines that are either unchanged from the common
1011 ancestor, or cleanly resolved because only one side changed,
1012 &lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1013 or cleanly resolved because both sides changed the same way.
1014 Conflict resolution is hard;
1015 let's go shopping.
1016 ||||||| base:sample.txt
1017 or cleanly resolved because both sides changed identically.
1018 Conflict resolution is hard.
1019 =======
1020 or cleanly resolved because both sides changed the same way.
1021 Git makes conflict resolution easy.
1022 &gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
1023 And here is another line that is cleanly resolved or unmodified.</pre>
1024 </div>
1025 </div>
1026 <div class="paragraph">
1027 <p>while in "zdiff3" style, it may look like this:</p>
1028 </div>
1029 <div class="listingblock">
1030 <div class="content">
1031 <pre>Here are lines that are either unchanged from the common
1032 ancestor, or cleanly resolved because only one side changed,
1033 or cleanly resolved because both sides changed the same way.
1034 &lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1035 Conflict resolution is hard;
1036 let's go shopping.
1037 ||||||| base:sample.txt
1038 or cleanly resolved because both sides changed identically.
1039 Conflict resolution is hard.
1040 =======
1041 Git makes conflict resolution easy.
1042 &gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
1043 And here is another line that is cleanly resolved or unmodified.</pre>
1044 </div>
1045 </div>
1046 <div class="paragraph">
1047 <p>In addition to the &lt;&lt;&lt;&lt;&lt;&lt;&lt;, <code>=======</code>, and &gt;&gt;&gt;&gt;&gt;&gt;&gt; markers, it uses
1048 another ||||||| marker that is followed by the original text. You can
1049 tell that the original just stated a fact, and your side simply gave in to
1050 that statement and gave up, while the other side tried to have a more
1051 positive attitude. You can sometimes come up with a better resolution by
1052 viewing the original.</p>
1053 </div>
1054 </div>
1055 </div>
1056 <div class="sect1">
1057 <h2 id="_how_to_resolve_conflicts">HOW TO RESOLVE CONFLICTS</h2>
1058 <div class="sectionbody">
1059 <div class="paragraph">
1060 <p>After seeing a conflict, you can do two things:</p>
1061 </div>
1062 <div class="ulist">
1063 <ul>
1064 <li>
1065 <p>Decide not to merge. The only clean-ups you need are to reset
1066 the index file to the <code>HEAD</code> commit to reverse 2. and to clean
1067 up working tree changes made by 2. and 3.; <code>git</code> <code>merge</code> <code>--abort</code>
1068 can be used for this.</p>
1069 </li>
1070 <li>
1071 <p>Resolve the conflicts. Git will mark the conflicts in
1072 the working tree. Edit the files into shape and
1073 <code>git</code> <code>add</code> them to the index. Use <code>git</code> <code>commit</code> or
1074 <code>git</code> <code>merge</code> <code>--continue</code> to seal the deal. The latter command
1075 checks whether there is a (interrupted) merge in progress
1076 before calling <code>git</code> <code>commit</code>.</p>
1077 </li>
1078 </ul>
1079 </div>
1080 <div class="paragraph">
1081 <p>You can work through the conflict with a number of tools:</p>
1082 </div>
1083 <div class="ulist">
1084 <ul>
1085 <li>
1086 <p>Use a mergetool. <code>git</code> <code>mergetool</code> to launch a graphical
1087 mergetool which will work through the merge with you.</p>
1088 </li>
1089 <li>
1090 <p>Look at the diffs. <code>git</code> <code>diff</code> will show a three-way diff,
1091 highlighting changes from both the <code>HEAD</code> and <code>MERGE_HEAD</code>
1092 versions. <code>git</code> <code>diff</code> <code>AUTO_MERGE</code> will show what changes you&#8217;ve
1093 made so far to resolve textual conflicts.</p>
1094 </li>
1095 <li>
1096 <p>Look at the diffs from each branch. <code>git</code> <code>log</code> <code>--merge</code> <code>-p</code> <em>&lt;path&gt;</em>
1097 will show diffs first for the <code>HEAD</code> version and then the
1098 <code>MERGE_HEAD</code> version.</p>
1099 </li>
1100 <li>
1101 <p>Look at the originals. <code>git</code> <code>show</code> <code>:1:filename</code> shows the
1102 common ancestor, <code>git</code> <code>show</code> <code>:2:filename</code> shows the <code>HEAD</code>
1103 version, and <code>git</code> <code>show</code> <code>:3:filename</code> shows the <code>MERGE_HEAD</code>
1104 version.</p>
1105 </li>
1106 </ul>
1107 </div>
1108 </div>
1109 </div>
1110 <div class="sect1">
1111 <h2 id="_examples">EXAMPLES</h2>
1112 <div class="sectionbody">
1113 <div class="ulist">
1114 <ul>
1115 <li>
1116 <p>Merge branches <code>fixes</code> and <code>enhancements</code> on top of
1117 the current branch, making an octopus merge:</p>
1118 <div class="listingblock">
1119 <div class="content">
1120 <pre>$ git merge fixes enhancements</pre>
1121 </div>
1122 </div>
1123 </li>
1124 <li>
1125 <p>Merge branch <code>obsolete</code> into the current branch, using <code>ours</code>
1126 merge strategy:</p>
1127 <div class="listingblock">
1128 <div class="content">
1129 <pre>$ git merge -s ours obsolete</pre>
1130 </div>
1131 </div>
1132 </li>
1133 <li>
1134 <p>Merge branch <code>maint</code> into the current branch, but do not make
1135 a new commit automatically:</p>
1136 <div class="listingblock">
1137 <div class="content">
1138 <pre>$ git merge --no-commit maint</pre>
1139 </div>
1140 </div>
1141 <div class="paragraph">
1142 <p>This can be used when you want to include further changes to the
1143 merge, or want to write your own merge commit message.</p>
1144 </div>
1145 <div class="paragraph">
1146 <p>You should refrain from abusing this option to sneak substantial
1147 changes into a merge commit. Small fixups like bumping
1148 release/version name would be acceptable.</p>
1149 </div>
1150 </li>
1151 </ul>
1152 </div>
1153 </div>
1154 </div>
1155 <div class="sect1">
1156 <h2 id="_merge_strategies">MERGE STRATEGIES</h2>
1157 <div class="sectionbody">
1158 <div class="paragraph">
1159 <p>The merge mechanism (<code>git</code> <code>merge</code> and <code>git</code> <code>pull</code> commands) allows the
1160 backend <em>merge strategies</em> to be chosen with <code>-s</code> option. Some strategies
1161 can also take their own options, which can be passed by giving <code>-X</code><em>&lt;option&gt;</em>
1162 arguments to <code>git</code> <code>merge</code> and/or <code>git</code> <code>pull</code>.</p>
1163 </div>
1164 <div class="dlist">
1165 <dl>
1166 <dt class="hdlist1">ort</dt>
1167 <dd>
1168 <p>This is the default merge strategy when pulling or merging one
1169 branch. This strategy can only resolve two heads using a
1170 3-way merge algorithm. When there is more than one common
1171 ancestor that can be used for 3-way merge, it creates a merged
1172 tree of the common ancestors and uses that as the reference
1173 tree for the 3-way merge. This has been reported to result in
1174 fewer merge conflicts without causing mismerges by tests done
1175 on actual merge commits taken from Linux 2.6 kernel
1176 development history. Additionally this strategy can detect
1177 and handle merges involving renames. It does not make use of
1178 detected copies. The name for this algorithm is an acronym
1179 ("Ostensibly Recursive&#8217;s Twin") and came from the fact that it
1180 was written as a replacement for the previous default
1181 algorithm, <code>recursive</code>.</p>
1182 <div class="paragraph">
1183 <p>The <em>ort</em> strategy can take the following options:</p>
1184 </div>
1185 <div class="dlist">
1186 <dl>
1187 <dt class="hdlist1">ours</dt>
1188 <dd>
1189 <p>This option forces conflicting hunks to be auto-resolved cleanly by
1190 favoring <em>our</em> version. Changes from the other tree that do not
1191 conflict with our side are reflected in the merge result.
1192 For a binary file, the entire contents are taken from our side.</p>
1193 <div class="paragraph">
1194 <p>This should not be confused with the <em>ours</em> merge strategy, which does not
1195 even look at what the other tree contains at all. It discards everything
1196 the other tree did, declaring <em>our</em> history contains all that happened in it.</p>
1197 </div>
1198 </dd>
1199 <dt class="hdlist1">theirs</dt>
1200 <dd>
1201 <p>This is the opposite of <em>ours</em>; note that, unlike <em>ours</em>, there is
1202 no <em>theirs</em> merge strategy to confuse this merge option with.</p>
1203 </dd>
1204 <dt class="hdlist1">ignore-space-change</dt>
1205 <dt class="hdlist1">ignore-all-space</dt>
1206 <dt class="hdlist1">ignore-space-at-eol</dt>
1207 <dt class="hdlist1">ignore-cr-at-eol</dt>
1208 <dd>
1209 <p>Treats lines with the indicated type of whitespace change as
1210 unchanged for the sake of a three-way merge. Whitespace
1211 changes mixed with other changes to a line are not ignored.
1212 See also <a href="git-diff.html">git-diff(1)</a> <code>-b</code>, <code>-w</code>,
1213 <code>--ignore-space-at-eol</code>, and <code>--ignore-cr-at-eol</code>.</p>
1214 <div class="ulist">
1215 <ul>
1216 <li>
1217 <p>If <em>their</em> version only introduces whitespace changes to a line,
1218 <em>our</em> version is used;</p>
1219 </li>
1220 <li>
1221 <p>If <em>our</em> version introduces whitespace changes but <em>their</em>
1222 version includes a substantial change, <em>their</em> version is used;</p>
1223 </li>
1224 <li>
1225 <p>Otherwise, the merge proceeds in the usual way.</p>
1226 </li>
1227 </ul>
1228 </div>
1229 </dd>
1230 <dt class="hdlist1">renormalize</dt>
1231 <dd>
1232 <p>This runs a virtual check-out and check-in of all three stages
1233 of a file when resolving a three-way merge. This option is
1234 meant to be used when merging branches with different clean
1235 filters or end-of-line normalization rules. See "Merging
1236 branches with differing checkin/checkout attributes" in
1237 <a href="gitattributes.html">gitattributes(5)</a> for details.</p>
1238 </dd>
1239 <dt class="hdlist1">no-renormalize</dt>
1240 <dd>
1241 <p>Disables the <code>renormalize</code> option. This overrides the
1242 <code>merge.renormalize</code> configuration variable.</p>
1243 </dd>
1244 <dt class="hdlist1">find-renames[=&lt;n&gt;]</dt>
1245 <dd>
1246 <p>Turn on rename detection, optionally setting the similarity
1247 threshold. This is the default. This overrides the
1248 <em>merge.renames</em> configuration variable.
1249 See also <a href="git-diff.html">git-diff(1)</a> <code>--find-renames</code>.</p>
1250 </dd>
1251 <dt class="hdlist1">rename-threshold=&lt;n&gt;</dt>
1252 <dd>
1253 <p>Deprecated synonym for <code>find-renames=</code><em>&lt;n&gt;</em>.</p>
1254 </dd>
1255 <dt class="hdlist1">subtree[=&lt;path&gt;]</dt>
1256 <dd>
1257 <p>This option is a more advanced form of <em>subtree</em> strategy, where
1258 the strategy makes a guess on how two trees must be shifted to
1259 match with each other when merging. Instead, the specified path
1260 is prefixed (or stripped from the beginning) to make the shape of
1261 two trees to match.</p>
1262 </dd>
1263 </dl>
1264 </div>
1265 </dd>
1266 <dt class="hdlist1">recursive</dt>
1267 <dd>
1268 <p>This can only resolve two heads using a 3-way merge
1269 algorithm. When there is more than one common
1270 ancestor that can be used for 3-way merge, it creates a
1271 merged tree of the common ancestors and uses that as
1272 the reference tree for the 3-way merge. This has been
1273 reported to result in fewer merge conflicts without
1274 causing mismerges by tests done on actual merge commits
1275 taken from Linux 2.6 kernel development history.
1276 Additionally this can detect and handle merges involving
1277 renames. It does not make use of detected copies. This was
1278 the default strategy for resolving two heads from Git v0.99.9k
1279 until v2.33.0.</p>
1280 <div class="paragraph">
1281 <p>The <em>recursive</em> strategy takes the same options as <em>ort</em>. However,
1282 there are three additional options that <em>ort</em> ignores (not documented
1283 above) that are potentially useful with the <em>recursive</em> strategy:</p>
1284 </div>
1285 <div class="dlist">
1286 <dl>
1287 <dt class="hdlist1">patience</dt>
1288 <dd>
1289 <p>Deprecated synonym for <code>diff-algorithm=patience</code>.</p>
1290 </dd>
1291 <dt class="hdlist1">diff-algorithm=[patience|minimal|histogram|myers]</dt>
1292 <dd>
1293 <p>Use a different diff algorithm while merging, which can help
1294 avoid mismerges that occur due to unimportant matching lines
1295 (such as braces from distinct functions). See also
1296 <a href="git-diff.html">git-diff(1)</a> <code>--diff-algorithm</code>. Note that <code>ort</code>
1297 specifically uses <code>diff-algorithm=histogram</code>, while <code>recursive</code>
1298 defaults to the <code>diff.algorithm</code> config setting.</p>
1299 </dd>
1300 <dt class="hdlist1">no-renames</dt>
1301 <dd>
1302 <p>Turn off rename detection. This overrides the <code>merge.renames</code>
1303 configuration variable.
1304 See also <a href="git-diff.html">git-diff(1)</a> <code>--no-renames</code>.</p>
1305 </dd>
1306 </dl>
1307 </div>
1308 </dd>
1309 <dt class="hdlist1">resolve</dt>
1310 <dd>
1311 <p>This can only resolve two heads (i.e. the current branch
1312 and another branch you pulled from) using a 3-way merge
1313 algorithm. It tries to carefully detect criss-cross
1314 merge ambiguities. It does not handle renames.</p>
1315 </dd>
1316 <dt class="hdlist1">octopus</dt>
1317 <dd>
1318 <p>This resolves cases with more than two heads, but refuses to do
1319 a complex merge that needs manual resolution. It is
1320 primarily meant to be used for bundling topic branch
1321 heads together. This is the default merge strategy when
1322 pulling or merging more than one branch.</p>
1323 </dd>
1324 <dt class="hdlist1">ours</dt>
1325 <dd>
1326 <p>This resolves any number of heads, but the resulting tree of the
1327 merge is always that of the current branch head, effectively
1328 ignoring all changes from all other branches. It is meant to
1329 be used to supersede old development history of side
1330 branches. Note that this is different from the -Xours option to
1331 the <em>recursive</em> merge strategy.</p>
1332 </dd>
1333 <dt class="hdlist1">subtree</dt>
1334 <dd>
1335 <p>This is a modified <code>ort</code> strategy. When merging trees A and
1336 B, if B corresponds to a subtree of A, B is first adjusted to
1337 match the tree structure of A, instead of reading the trees at
1338 the same level. This adjustment is also done to the common
1339 ancestor tree.</p>
1340 </dd>
1341 </dl>
1342 </div>
1343 <div class="paragraph">
1344 <p>With the strategies that use 3-way merge (including the default, <em>ort</em>),
1345 if a change is made on both branches, but later reverted on one of the
1346 branches, that change will be present in the merged result; some people find
1347 this behavior confusing. It occurs because only the heads and the merge base
1348 are considered when performing a merge, not the individual commits. The merge
1349 algorithm therefore considers the reverted change as no change at all, and
1350 substitutes the changed version instead.</p>
1351 </div>
1352 </div>
1353 </div>
1354 <div class="sect1">
1355 <h2 id="_configuration">CONFIGURATION</h2>
1356 <div class="sectionbody">
1357 <div class="dlist">
1358 <dl>
1359 <dt class="hdlist1">branch.&lt;name&gt;.mergeOptions</dt>
1360 <dd>
1361 <p>Sets default options for merging into branch &lt;name&gt;. The syntax and
1362 supported options are the same as those of <code>git</code> <code>merge</code>, but option
1363 values containing whitespace characters are currently not supported.</p>
1364 </dd>
1365 </dl>
1366 </div>
1367 <div class="paragraph">
1368 <p>Everything above this line in this section isn&#8217;t included from the
1369 <a href="git-config.html">git-config(1)</a> documentation. The content that follows is the
1370 same as what&#8217;s found there:</p>
1371 </div>
1372 <div class="dlist">
1373 <dl>
1374 <dt class="hdlist1">merge.conflictStyle</dt>
1375 <dd>
1376 <p>Specify the style in which conflicted hunks are written out to
1377 working tree files upon merge. The default is "merge", which
1378 shows a &lt;&lt;&lt;&lt;&lt;&lt;&lt; conflict marker, changes made by one side,
1379 a <code>=======</code> marker, changes made by the other side, and then
1380 a &gt;&gt;&gt;&gt;&gt;&gt;&gt; marker. An alternate style, "diff3", adds a |||||||
1381 marker and the original text before the <code>=======</code> marker. The
1382 "merge" style tends to produce smaller conflict regions than diff3,
1383 both because of the exclusion of the original text, and because
1384 when a subset of lines match on the two sides, they are just pulled
1385 out of the conflict region. Another alternate style, "zdiff3", is
1386 similar to diff3 but removes matching lines on the two sides from
1387 the conflict region when those matching lines appear near either
1388 the beginning or end of a conflict region.</p>
1389 </dd>
1390 <dt class="hdlist1">merge.defaultToUpstream</dt>
1391 <dd>
1392 <p>If merge is called without any commit argument, merge the upstream
1393 branches configured for the current branch by using their last
1394 observed values stored in their remote-tracking branches.
1395 The values of the <code>branch.</code>&lt;current <code>branch</code>&gt;<code>.merge</code> that name the
1396 branches at the remote named by <code>branch.</code>&lt;current <code>branch</code>&gt;<code>.remote</code>
1397 are consulted, and then they are mapped via <code>remote.</code><em>&lt;remote&gt;</em><code>.fetch</code>
1398 to their corresponding remote-tracking branches, and the tips of
1399 these tracking branches are merged. Defaults to true.</p>
1400 </dd>
1401 <dt class="hdlist1">merge.ff</dt>
1402 <dd>
1403 <p>By default, Git does not create an extra merge commit when merging
1404 a commit that is a descendant of the current commit. Instead, the
1405 tip of the current branch is fast-forwarded. When set to <code>false</code>,
1406 this variable tells Git to create an extra merge commit in such
1407 a case (equivalent to giving the <code>--no-ff</code> option from the command
1408 line). When set to <code>only</code>, only such fast-forward merges are
1409 allowed (equivalent to giving the <code>--ff-only</code> option from the
1410 command line).</p>
1411 </dd>
1412 <dt class="hdlist1">merge.verifySignatures</dt>
1413 <dd>
1414 <p>If true, this is equivalent to the --verify-signatures command
1415 line option. See <a href="git-merge.html">git-merge(1)</a> for details.</p>
1416 </dd>
1417 <dt class="hdlist1">merge.branchdesc</dt>
1418 <dd>
1419 <p>In addition to branch names, populate the log message with
1420 the branch description text associated with them. Defaults
1421 to false.</p>
1422 </dd>
1423 <dt class="hdlist1">merge.log</dt>
1424 <dd>
1425 <p>In addition to branch names, populate the log message with at
1426 most the specified number of one-line descriptions from the
1427 actual commits that are being merged. Defaults to false, and
1428 true is a synonym for 20.</p>
1429 </dd>
1430 <dt class="hdlist1">merge.suppressDest</dt>
1431 <dd>
1432 <p>By adding a glob that matches the names of integration
1433 branches to this multi-valued configuration variable, the
1434 default merge message computed for merges into these
1435 integration branches will omit "into &lt;branch name&gt;" from
1436 its title.</p>
1437 <div class="paragraph">
1438 <p>An element with an empty value can be used to clear the list
1439 of globs accumulated from previous configuration entries.
1440 When there is no <code>merge.suppressDest</code> variable defined, the
1441 default value of <code>master</code> is used for backward compatibility.</p>
1442 </div>
1443 </dd>
1444 <dt class="hdlist1">merge.renameLimit</dt>
1445 <dd>
1446 <p>The number of files to consider in the exhaustive portion of
1447 rename detection during a merge. If not specified, defaults
1448 to the value of diff.renameLimit. If neither
1449 merge.renameLimit nor diff.renameLimit are specified,
1450 currently defaults to 7000. This setting has no effect if
1451 rename detection is turned off.</p>
1452 </dd>
1453 <dt class="hdlist1">merge.renames</dt>
1454 <dd>
1455 <p>Whether Git detects renames. If set to "false", rename detection
1456 is disabled. If set to "true", basic rename detection is enabled.
1457 Defaults to the value of diff.renames.</p>
1458 </dd>
1459 <dt class="hdlist1">merge.directoryRenames</dt>
1460 <dd>
1461 <p>Whether Git detects directory renames, affecting what happens at
1462 merge time to new files added to a directory on one side of
1463 history when that directory was renamed on the other side of
1464 history. If merge.directoryRenames is set to "false", directory
1465 rename detection is disabled, meaning that such new files will be
1466 left behind in the old directory. If set to "true", directory
1467 rename detection is enabled, meaning that such new files will be
1468 moved into the new directory. If set to "conflict", a conflict
1469 will be reported for such paths. If merge.renames is false,
1470 merge.directoryRenames is ignored and treated as false. Defaults
1471 to "conflict".</p>
1472 </dd>
1473 <dt class="hdlist1">merge.renormalize</dt>
1474 <dd>
1475 <p>Tell Git that canonical representation of files in the
1476 repository has changed over time (e.g. earlier commits record
1477 text files with CRLF line endings, but recent ones use LF line
1478 endings). In such a repository, Git can convert the data
1479 recorded in commits to a canonical form before performing a
1480 merge to reduce unnecessary conflicts. For more information,
1481 see section "Merging branches with differing checkin/checkout
1482 attributes" in <a href="gitattributes.html">gitattributes(5)</a>.</p>
1483 </dd>
1484 <dt class="hdlist1">merge.stat</dt>
1485 <dd>
1486 <p>Whether to print the diffstat between ORIG_HEAD and the merge result
1487 at the end of the merge. True by default.</p>
1488 </dd>
1489 <dt class="hdlist1">merge.autoStash</dt>
1490 <dd>
1491 <p>When set to true, automatically create a temporary stash entry
1492 before the operation begins, and apply it after the operation
1493 ends. This means that you can run merge on a dirty worktree.
1494 However, use with care: the final stash application after a
1495 successful merge might result in non-trivial conflicts.
1496 This option can be overridden by the <code>--no-autostash</code> and
1497 <code>--autostash</code> options of <a href="git-merge.html">git-merge(1)</a>.
1498 Defaults to false.</p>
1499 </dd>
1500 <dt class="hdlist1">merge.tool</dt>
1501 <dd>
1502 <p>Controls which merge tool is used by <a href="git-mergetool.html">git-mergetool(1)</a>.
1503 The list below shows the valid built-in values.
1504 Any other value is treated as a custom merge tool and requires
1505 that a corresponding mergetool.&lt;tool&gt;.cmd variable is defined.</p>
1506 </dd>
1507 <dt class="hdlist1">merge.guitool</dt>
1508 <dd>
1509 <p>Controls which merge tool is used by <a href="git-mergetool.html">git-mergetool(1)</a> when the
1510 -g/--gui flag is specified. The list below shows the valid built-in values.
1511 Any other value is treated as a custom merge tool and requires that a
1512 corresponding mergetool.&lt;guitool&gt;.cmd variable is defined.</p>
1513 <div class="dlist">
1514 <dl>
1515 <dt class="hdlist1"><code>araxis</code></dt>
1516 <dd>
1517 <p>Use Araxis Merge (requires a graphical session)</p>
1518 </dd>
1519 <dt class="hdlist1"><code>bc</code></dt>
1520 <dd>
1521 <p>Use Beyond Compare (requires a graphical session)</p>
1522 </dd>
1523 <dt class="hdlist1"><code>bc3</code></dt>
1524 <dd>
1525 <p>Use Beyond Compare (requires a graphical session)</p>
1526 </dd>
1527 <dt class="hdlist1"><code>bc4</code></dt>
1528 <dd>
1529 <p>Use Beyond Compare (requires a graphical session)</p>
1530 </dd>
1531 <dt class="hdlist1"><code>codecompare</code></dt>
1532 <dd>
1533 <p>Use Code Compare (requires a graphical session)</p>
1534 </dd>
1535 <dt class="hdlist1"><code>deltawalker</code></dt>
1536 <dd>
1537 <p>Use DeltaWalker (requires a graphical session)</p>
1538 </dd>
1539 <dt class="hdlist1"><code>diffmerge</code></dt>
1540 <dd>
1541 <p>Use DiffMerge (requires a graphical session)</p>
1542 </dd>
1543 <dt class="hdlist1"><code>diffuse</code></dt>
1544 <dd>
1545 <p>Use Diffuse (requires a graphical session)</p>
1546 </dd>
1547 <dt class="hdlist1"><code>ecmerge</code></dt>
1548 <dd>
1549 <p>Use ECMerge (requires a graphical session)</p>
1550 </dd>
1551 <dt class="hdlist1"><code>emerge</code></dt>
1552 <dd>
1553 <p>Use Emacs' Emerge</p>
1554 </dd>
1555 <dt class="hdlist1"><code>examdiff</code></dt>
1556 <dd>
1557 <p>Use ExamDiff Pro (requires a graphical session)</p>
1558 </dd>
1559 <dt class="hdlist1"><code>guiffy</code></dt>
1560 <dd>
1561 <p>Use Guiffy&#8217;s Diff Tool (requires a graphical session)</p>
1562 </dd>
1563 <dt class="hdlist1"><code>gvimdiff</code></dt>
1564 <dd>
1565 <p>Use gVim (requires a graphical session) with a custom layout (see <code>git</code> <code>help</code> <code>mergetool</code>'s <code>BACKEND</code> <code>SPECIFIC</code> <code>HINTS</code> section)</p>
1566 </dd>
1567 <dt class="hdlist1"><code>gvimdiff1</code></dt>
1568 <dd>
1569 <p>Use gVim (requires a graphical session) with a 2 panes layout (LOCAL and REMOTE)</p>
1570 </dd>
1571 <dt class="hdlist1"><code>gvimdiff2</code></dt>
1572 <dd>
1573 <p>Use gVim (requires a graphical session) with a 3 panes layout (LOCAL, MERGED and REMOTE)</p>
1574 </dd>
1575 <dt class="hdlist1"><code>gvimdiff3</code></dt>
1576 <dd>
1577 <p>Use gVim (requires a graphical session) where only the MERGED file is shown</p>
1578 </dd>
1579 <dt class="hdlist1"><code>kdiff3</code></dt>
1580 <dd>
1581 <p>Use KDiff3 (requires a graphical session)</p>
1582 </dd>
1583 <dt class="hdlist1"><code>meld</code></dt>
1584 <dd>
1585 <p>Use Meld (requires a graphical session) with optional <code>auto</code> <code>merge</code> (see <code>git</code> <code>help</code> <code>mergetool</code>'s <code>CONFIGURATION</code> section)</p>
1586 </dd>
1587 <dt class="hdlist1"><code>nvimdiff</code></dt>
1588 <dd>
1589 <p>Use Neovim with a custom layout (see <code>git</code> <code>help</code> <code>mergetool</code>'s <code>BACKEND</code> <code>SPECIFIC</code> <code>HINTS</code> section)</p>
1590 </dd>
1591 <dt class="hdlist1"><code>nvimdiff1</code></dt>
1592 <dd>
1593 <p>Use Neovim with a 2 panes layout (LOCAL and REMOTE)</p>
1594 </dd>
1595 <dt class="hdlist1"><code>nvimdiff2</code></dt>
1596 <dd>
1597 <p>Use Neovim with a 3 panes layout (LOCAL, MERGED and REMOTE)</p>
1598 </dd>
1599 <dt class="hdlist1"><code>nvimdiff3</code></dt>
1600 <dd>
1601 <p>Use Neovim where only the MERGED file is shown</p>
1602 </dd>
1603 <dt class="hdlist1"><code>opendiff</code></dt>
1604 <dd>
1605 <p>Use FileMerge (requires a graphical session)</p>
1606 </dd>
1607 <dt class="hdlist1"><code>p4merge</code></dt>
1608 <dd>
1609 <p>Use HelixCore P4Merge (requires a graphical session)</p>
1610 </dd>
1611 <dt class="hdlist1"><code>smerge</code></dt>
1612 <dd>
1613 <p>Use Sublime Merge (requires a graphical session)</p>
1614 </dd>
1615 <dt class="hdlist1"><code>tkdiff</code></dt>
1616 <dd>
1617 <p>Use TkDiff (requires a graphical session)</p>
1618 </dd>
1619 <dt class="hdlist1"><code>tortoisemerge</code></dt>
1620 <dd>
1621 <p>Use TortoiseMerge (requires a graphical session)</p>
1622 </dd>
1623 <dt class="hdlist1"><code>vimdiff</code></dt>
1624 <dd>
1625 <p>Use Vim with a custom layout (see <code>git</code> <code>help</code> <code>mergetool</code>'s <code>BACKEND</code> <code>SPECIFIC</code> <code>HINTS</code> section)</p>
1626 </dd>
1627 <dt class="hdlist1"><code>vimdiff1</code></dt>
1628 <dd>
1629 <p>Use Vim with a 2 panes layout (LOCAL and REMOTE)</p>
1630 </dd>
1631 <dt class="hdlist1"><code>vimdiff2</code></dt>
1632 <dd>
1633 <p>Use Vim with a 3 panes layout (LOCAL, MERGED and REMOTE)</p>
1634 </dd>
1635 <dt class="hdlist1"><code>vimdiff3</code></dt>
1636 <dd>
1637 <p>Use Vim where only the MERGED file is shown</p>
1638 </dd>
1639 <dt class="hdlist1"><code>vscode</code></dt>
1640 <dd>
1641 <p>Use Visual Studio Code (requires a graphical session)</p>
1642 </dd>
1643 <dt class="hdlist1"><code>winmerge</code></dt>
1644 <dd>
1645 <p>Use WinMerge (requires a graphical session)</p>
1646 </dd>
1647 <dt class="hdlist1"><code>xxdiff</code></dt>
1648 <dd>
1649 <p>Use xxdiff (requires a graphical session)</p>
1650 </dd>
1651 </dl>
1652 </div>
1653 </dd>
1654 <dt class="hdlist1">merge.verbosity</dt>
1655 <dd>
1656 <p>Controls the amount of output shown by the recursive merge
1657 strategy. Level 0 outputs nothing except a final error
1658 message if conflicts were detected. Level 1 outputs only
1659 conflicts, 2 outputs conflicts and file changes. Level 5 and
1660 above outputs debugging information. The default is level 2.
1661 Can be overridden by the <code>GIT_MERGE_VERBOSITY</code> environment variable.</p>
1662 </dd>
1663 <dt class="hdlist1">merge.&lt;driver&gt;.name</dt>
1664 <dd>
1665 <p>Defines a human-readable name for a custom low-level
1666 merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details.</p>
1667 </dd>
1668 <dt class="hdlist1">merge.&lt;driver&gt;.driver</dt>
1669 <dd>
1670 <p>Defines the command that implements a custom low-level
1671 merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details.</p>
1672 </dd>
1673 <dt class="hdlist1">merge.&lt;driver&gt;.recursive</dt>
1674 <dd>
1675 <p>Names a low-level merge driver to be used when
1676 performing an internal merge between common ancestors.
1677 See <a href="gitattributes.html">gitattributes(5)</a> for details.</p>
1678 </dd>
1679 </dl>
1680 </div>
1681 </div>
1682 </div>
1683 <div class="sect1">
1684 <h2 id="_see_also">SEE ALSO</h2>
1685 <div class="sectionbody">
1686 <div class="paragraph">
1687 <p><a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>, <a href="git-pull.html">git-pull(1)</a>,
1688 <a href="gitattributes.html">gitattributes(5)</a>,
1689 <a href="git-reset.html">git-reset(1)</a>,
1690 <a href="git-diff.html">git-diff(1)</a>, <a href="git-ls-files.html">git-ls-files(1)</a>,
1691 <a href="git-add.html">git-add(1)</a>, <a href="git-rm.html">git-rm(1)</a>,
1692 <a href="git-mergetool.html">git-mergetool(1)</a></p>
1693 </div>
1694 </div>
1695 </div>
1696 <div class="sect1">
1697 <h2 id="_git">GIT</h2>
1698 <div class="sectionbody">
1699 <div class="paragraph">
1700 <p>Part of the <a href="git.html">git(1)</a> suite</p>
1701 </div>
1702 </div>
1703 </div>
1704 </div>
1705 <div id="footer">
1706 <div id="footer-text">
1707 Last updated 2024-01-08 14:58:46 -0800
1708 </div>
1709 </div>
1710 </body>
1711 </html>