Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 6 | <meta name="generator" content="AsciiDoc 8.5.2" /> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 7 | <title>git-merge(1)</title> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 8 | <style type="text/css"> |
| 9 | /* Debug borders */ |
| 10 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 11 | /* |
| 12 | border: 1px solid red; |
| 13 | */ |
| 14 | } |
| 15 | |
| 16 | body { |
| 17 | margin: 1em 5% 1em 5%; |
| 18 | } |
| 19 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 20 | a { |
| 21 | color: blue; |
| 22 | text-decoration: underline; |
| 23 | } |
| 24 | a:visited { |
| 25 | color: fuchsia; |
| 26 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 27 | |
| 28 | em { |
| 29 | font-style: italic; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 30 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | strong { |
| 34 | font-weight: bold; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 35 | color: #083194; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | tt { |
| 39 | color: navy; |
| 40 | } |
| 41 | |
| 42 | h1, h2, h3, h4, h5, h6 { |
| 43 | color: #527bbd; |
| 44 | font-family: sans-serif; |
| 45 | margin-top: 1.2em; |
| 46 | margin-bottom: 0.5em; |
| 47 | line-height: 1.3; |
| 48 | } |
| 49 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 50 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | border-bottom: 2px solid silver; |
| 52 | } |
| 53 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 54 | padding-top: 0.5em; |
| 55 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 56 | h3 { |
| 57 | float: left; |
| 58 | } |
| 59 | h3 + * { |
| 60 | clear: left; |
| 61 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 62 | |
| 63 | div.sectionbody { |
| 64 | font-family: serif; |
| 65 | margin-left: 0; |
| 66 | } |
| 67 | |
| 68 | hr { |
| 69 | border: 1px solid silver; |
| 70 | } |
| 71 | |
| 72 | p { |
| 73 | margin-top: 0.5em; |
| 74 | margin-bottom: 0.5em; |
| 75 | } |
| 76 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 77 | ul, ol, li > p { |
| 78 | margin-top: 0; |
| 79 | } |
| 80 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 81 | pre { |
| 82 | padding: 0; |
| 83 | margin: 0; |
| 84 | } |
| 85 | |
| 86 | span#author { |
| 87 | color: #527bbd; |
| 88 | font-family: sans-serif; |
| 89 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 90 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 91 | } |
| 92 | span#email { |
| 93 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 94 | span#revnumber, span#revdate, span#revremark { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 95 | font-family: sans-serif; |
| 96 | } |
| 97 | |
| 98 | div#footer { |
| 99 | font-family: sans-serif; |
| 100 | font-size: small; |
| 101 | border-top: 2px solid silver; |
| 102 | padding-top: 0.5em; |
| 103 | margin-top: 4.0em; |
| 104 | } |
| 105 | div#footer-text { |
| 106 | float: left; |
| 107 | padding-bottom: 0.5em; |
| 108 | } |
| 109 | div#footer-badges { |
| 110 | float: right; |
| 111 | padding-bottom: 0.5em; |
| 112 | } |
| 113 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 114 | div#preamble { |
| 115 | margin-top: 1.5em; |
| 116 | margin-bottom: 1.5em; |
| 117 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 118 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 119 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 120 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 121 | margin-top: 1.0em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 122 | margin-bottom: 1.5em; |
| 123 | } |
| 124 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 125 | margin-top: 2.0em; |
| 126 | margin-bottom: 2.0em; |
| 127 | margin-right: 10%; |
| 128 | color: #606060; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | div.content { /* Block element content. */ |
| 132 | padding: 0; |
| 133 | } |
| 134 | |
| 135 | /* Block element titles. */ |
| 136 | div.title, caption.title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 137 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 138 | font-family: sans-serif; |
| 139 | font-weight: bold; |
| 140 | text-align: left; |
| 141 | margin-top: 1.0em; |
| 142 | margin-bottom: 0.5em; |
| 143 | } |
| 144 | div.title + * { |
| 145 | margin-top: 0; |
| 146 | } |
| 147 | |
| 148 | td div.title:first-child { |
| 149 | margin-top: 0.0em; |
| 150 | } |
| 151 | div.content div.title:first-child { |
| 152 | margin-top: 0.0em; |
| 153 | } |
| 154 | div.content + div.title { |
| 155 | margin-top: 0.0em; |
| 156 | } |
| 157 | |
| 158 | div.sidebarblock > div.content { |
| 159 | background: #ffffee; |
| 160 | border: 1px solid silver; |
| 161 | padding: 0.5em; |
| 162 | } |
| 163 | |
| 164 | div.listingblock > div.content { |
| 165 | border: 1px solid silver; |
| 166 | background: #f4f4f4; |
| 167 | padding: 0.5em; |
| 168 | } |
| 169 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 170 | div.quoteblock, div.verseblock { |
| 171 | padding-left: 1.0em; |
| 172 | margin-left: 1.0em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 173 | margin-right: 10%; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 174 | border-left: 5px solid #dddddd; |
| 175 | color: #777777; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 176 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 177 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 178 | div.quoteblock > div.attribution { |
| 179 | padding-top: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 180 | text-align: right; |
| 181 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 182 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 183 | div.verseblock > div.content { |
| 184 | white-space: pre; |
| 185 | } |
| 186 | div.verseblock > div.attribution { |
| 187 | padding-top: 0.75em; |
| 188 | text-align: left; |
| 189 | } |
| 190 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 191 | div.verseblock + div.attribution { |
| 192 | text-align: left; |
| 193 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 194 | |
| 195 | div.admonitionblock .icon { |
| 196 | vertical-align: top; |
| 197 | font-size: 1.1em; |
| 198 | font-weight: bold; |
| 199 | text-decoration: underline; |
| 200 | color: #527bbd; |
| 201 | padding-right: 0.5em; |
| 202 | } |
| 203 | div.admonitionblock td.content { |
| 204 | padding-left: 0.5em; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 205 | border-left: 3px solid #dddddd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | div.exampleblock > div.content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 209 | border-left: 3px solid #dddddd; |
| 210 | padding-left: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 211 | } |
| 212 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 213 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 214 | span.image img { border-style: none; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 215 | a.image:visited { color: white; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 216 | |
| 217 | dl { |
| 218 | margin-top: 0.8em; |
| 219 | margin-bottom: 0.8em; |
| 220 | } |
| 221 | dt { |
| 222 | margin-top: 0.5em; |
| 223 | margin-bottom: 0; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 224 | font-style: normal; |
| 225 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 226 | } |
| 227 | dd > *:first-child { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 228 | margin-top: 0.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 229 | } |
| 230 | |
| 231 | ul, ol { |
| 232 | list-style-position: outside; |
| 233 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 234 | ol.arabic { |
| 235 | list-style-type: decimal; |
| 236 | } |
| 237 | ol.loweralpha { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 238 | list-style-type: lower-alpha; |
| 239 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 240 | ol.upperalpha { |
| 241 | list-style-type: upper-alpha; |
| 242 | } |
| 243 | ol.lowerroman { |
| 244 | list-style-type: lower-roman; |
| 245 | } |
| 246 | ol.upperroman { |
| 247 | list-style-type: upper-roman; |
| 248 | } |
| 249 | |
| 250 | div.compact ul, div.compact ol, |
| 251 | div.compact p, div.compact p, |
| 252 | div.compact div, div.compact div { |
| 253 | margin-top: 0.1em; |
| 254 | margin-bottom: 0.1em; |
| 255 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 256 | |
| 257 | div.tableblock > table { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 258 | border: 3px solid #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 259 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 260 | thead, p.table.header { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 261 | font-family: sans-serif; |
| 262 | font-weight: bold; |
| 263 | } |
| 264 | tfoot { |
| 265 | font-weight: bold; |
| 266 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 267 | td > div.verse { |
| 268 | white-space: pre; |
| 269 | } |
| 270 | p.table { |
| 271 | margin-top: 0; |
| 272 | } |
| 273 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 274 | div.tableblock > table[frame="void"] { |
| 275 | border-style: none; |
| 276 | } |
| 277 | div.tableblock > table[frame="hsides"] { |
| 278 | border-left-style: none; |
| 279 | border-right-style: none; |
| 280 | } |
| 281 | div.tableblock > table[frame="vsides"] { |
| 282 | border-top-style: none; |
| 283 | border-bottom-style: none; |
| 284 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 285 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 286 | |
| 287 | div.hdlist { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 288 | margin-top: 0.8em; |
| 289 | margin-bottom: 0.8em; |
| 290 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 291 | div.hdlist tr { |
| 292 | padding-bottom: 15px; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 293 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 294 | dt.hdlist1.strong, td.hdlist1.strong { |
| 295 | font-weight: bold; |
| 296 | } |
| 297 | td.hdlist1 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 298 | vertical-align: top; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 299 | font-style: normal; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 300 | padding-right: 0.8em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 301 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 302 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 303 | td.hdlist2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 304 | vertical-align: top; |
| 305 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 306 | div.hdlist.compact tr { |
| 307 | margin: 0; |
| 308 | padding-bottom: 0; |
| 309 | } |
| 310 | |
| 311 | .comment { |
| 312 | background: yellow; |
| 313 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 314 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 315 | .footnote, .footnoteref { |
| 316 | font-size: 0.8em; |
| 317 | } |
| 318 | |
| 319 | span.footnote, span.footnoteref { |
| 320 | vertical-align: super; |
| 321 | } |
| 322 | |
| 323 | #footnotes { |
| 324 | margin: 20px 0 20px 0; |
| 325 | padding: 7px 0 0 0; |
| 326 | } |
| 327 | |
| 328 | #footnotes div.footnote { |
| 329 | margin: 0 0 5px 0; |
| 330 | } |
| 331 | |
| 332 | #footnotes hr { |
| 333 | border: none; |
| 334 | border-top: 1px solid silver; |
| 335 | height: 1px; |
| 336 | text-align: left; |
| 337 | margin-left: 0; |
| 338 | width: 20%; |
| 339 | min-width: 100px; |
| 340 | } |
| 341 | |
| 342 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 343 | @media print { |
| 344 | div#footer-badges { display: none; } |
| 345 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 346 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 347 | div#toc { |
| 348 | margin-bottom: 2.5em; |
| 349 | } |
| 350 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 351 | div#toctitle { |
| 352 | color: #527bbd; |
| 353 | font-family: sans-serif; |
| 354 | font-size: 1.1em; |
| 355 | font-weight: bold; |
| 356 | margin-top: 1.0em; |
| 357 | margin-bottom: 0.1em; |
| 358 | } |
| 359 | |
| 360 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 361 | margin-top: 0; |
| 362 | margin-bottom: 0; |
| 363 | } |
| 364 | div.toclevel2 { |
| 365 | margin-left: 2em; |
| 366 | font-size: 0.9em; |
| 367 | } |
| 368 | div.toclevel3 { |
| 369 | margin-left: 4em; |
| 370 | font-size: 0.9em; |
| 371 | } |
| 372 | div.toclevel4 { |
| 373 | margin-left: 6em; |
| 374 | font-size: 0.9em; |
| 375 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 376 | /* Overrides for manpage documents */ |
| 377 | h1 { |
| 378 | padding-top: 0.5em; |
| 379 | padding-bottom: 0.5em; |
| 380 | border-top: 2px solid silver; |
| 381 | border-bottom: 2px solid silver; |
| 382 | } |
| 383 | h2 { |
| 384 | border-style: none; |
| 385 | } |
| 386 | div.sectionbody { |
| 387 | margin-left: 5%; |
| 388 | } |
| 389 | |
| 390 | @media print { |
| 391 | div#toc { display: none; } |
| 392 | } |
| 393 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 394 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 395 | |
| 396 | div.sidebar-content { |
| 397 | background: #ffffee; |
| 398 | border: 1px solid silver; |
| 399 | padding: 0.5em; |
| 400 | } |
| 401 | div.sidebar-title, div.image-title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 402 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 403 | font-family: sans-serif; |
| 404 | font-weight: bold; |
| 405 | margin-top: 0.0em; |
| 406 | margin-bottom: 0.5em; |
| 407 | } |
| 408 | |
| 409 | div.listingblock div.content { |
| 410 | border: 1px solid silver; |
| 411 | background: #f4f4f4; |
| 412 | padding: 0.5em; |
| 413 | } |
| 414 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 415 | div.quoteblock-attribution { |
| 416 | padding-top: 0.5em; |
| 417 | text-align: right; |
| 418 | } |
| 419 | |
| 420 | div.verseblock-content { |
| 421 | white-space: pre; |
| 422 | } |
| 423 | div.verseblock-attribution { |
| 424 | padding-top: 0.75em; |
| 425 | text-align: left; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 426 | } |
| 427 | |
| 428 | div.exampleblock-content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 429 | border-left: 3px solid #dddddd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 430 | padding-left: 0.5em; |
| 431 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 432 | |
| 433 | /* IE6 sets dynamically generated links as visited. */ |
| 434 | div#toc a:visited { color: blue; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 435 | </style> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 436 | <script type="text/javascript"> |
| 437 | /*<+'])'); |
| 481 | // Function that scans the DOM tree for header elements (the DOM2 |
| 482 | // nodeIterator API would be a better technique but not supported by all |
| 483 | // browsers). |
| 484 | var iterate = function (el) { |
| 485 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 486 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 487 | var mo = re.exec(i.tagName); |
| 488 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 489 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 490 | } |
| 491 | iterate(i); |
| 492 | } |
| 493 | } |
| 494 | } |
| 495 | iterate(el); |
| 496 | return result; |
| 497 | } |
| 498 | |
| 499 | var toc = document.getElementById("toc"); |
| 500 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 501 | for (var i = 0; i < entries.length; ++i) { |
| 502 | var entry = entries[i]; |
| 503 | if (entry.element.id == "") |
| 504 | entry.element.id = "_toc_" + i; |
| 505 | var a = document.createElement("a"); |
| 506 | a.href = "#" + entry.element.id; |
| 507 | a.appendChild(document.createTextNode(entry.text)); |
| 508 | var div = document.createElement("div"); |
| 509 | div.appendChild(a); |
| 510 | div.className = "toclevel" + entry.toclevel; |
| 511 | toc.appendChild(div); |
| 512 | } |
| 513 | if (entries.length == 0) |
| 514 | toc.parentNode.removeChild(toc); |
| 515 | }, |
| 516 | |
| 517 | |
| 518 | ///////////////////////////////////////////////////////////////////// |
| 519 | // Footnotes generator |
| 520 | ///////////////////////////////////////////////////////////////////// |
| 521 | |
| 522 | /* Based on footnote generation code from: |
| 523 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 524 | */ |
| 525 | |
| 526 | footnotes: function () { |
| 527 | var cont = document.getElementById("content"); |
| 528 | var noteholder = document.getElementById("footnotes"); |
| 529 | var spans = cont.getElementsByTagName("span"); |
| 530 | var refs = {}; |
| 531 | var n = 0; |
| 532 | for (i=0; i<spans.length; i++) { |
| 533 | if (spans[i].className == "footnote") { |
| 534 | n++; |
| 535 | // Use [\s\S] in place of . so multi-line matches work. |
| 536 | // Because JavaScript has no s (dotall) regex flag. |
| 537 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 538 | noteholder.innerHTML += |
| 539 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 540 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 541 | n + "</a>. " + note + "</div>"; |
| 542 | spans[i].innerHTML = |
| 543 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 544 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 545 | var id =spans[i].getAttribute("id"); |
| 546 | if (id != null) refs["#"+id] = n; |
| 547 | } |
| 548 | } |
| 549 | if (n == 0) |
| 550 | noteholder.parentNode.removeChild(noteholder); |
| 551 | else { |
| 552 | // Process footnoterefs. |
| 553 | for (i=0; i<spans.length; i++) { |
| 554 | if (spans[i].className == "footnoteref") { |
| 555 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 556 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 557 | n = refs[href]; |
| 558 | spans[i].innerHTML = |
| 559 | "[<a href='#_footnote_" + n + |
| 560 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 561 | } |
| 562 | } |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | } |
| 567 | /*]]>*/ |
| 568 | </script> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 569 | </head> |
| 570 | <body> |
| 571 | <div id="header"> |
| 572 | <h1> |
| 573 | git-merge(1) Manual Page |
| 574 | </h1> |
| 575 | <h2>NAME</h2> |
| 576 | <div class="sectionbody"> |
| 577 | <p>git-merge - |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 578 | Join two or more development histories together |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 579 | </p> |
| 580 | </div> |
| 581 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 582 | <div id="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 583 | <h2 id="_synopsis">SYNOPSIS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 584 | <div class="sectionbody"> |
Junio C Hamano | ee6d961 | 2006-11-27 20:03:22 | [diff] [blame] | 585 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 586 | <div class="verseblock-content"><em>git merge</em> [-n] [--stat] [--no-commit] [--squash] |
Junio C Hamano | b04bb3f | 2010-04-14 14:07:36 | [diff] [blame] | 587 | [-s <strategy>] [-X <strategy-option>] |
Junio C Hamano | a03ac86 | 2011-04-02 04:32:29 | [diff] [blame] | 588 | [--[no-]rerere-autoupdate] [-m <msg>] [<commit>…] |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 589 | <em>git merge</em> <msg> HEAD <commit>… |
| 590 | <em>git merge</em> --abort</div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 591 | <div class="verseblock-attribution"> |
| 592 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 593 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 594 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 595 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 596 | <div class="paragraph"><p>Incorporates changes from the named commits (since the time their |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 597 | histories diverged from the current branch) into the current |
| 598 | branch. This command is used by <em>git pull</em> to incorporate changes |
| 599 | from another repository and can be used by hand to merge changes |
| 600 | from one branch into another.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 601 | <div class="paragraph"><p>Assume the following history exists and the current branch is |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 602 | "<tt>master</tt>":</p></div> |
| 603 | <div class="listingblock"> |
| 604 | <div class="content"> |
| 605 | <pre><tt> A---B---C topic |
| 606 | / |
| 607 | D---E---F---G master</tt></pre> |
| 608 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 609 | <div class="paragraph"><p>Then "<tt>git merge topic</tt>" will replay the changes made on the |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 610 | <tt>topic</tt> branch since it diverged from <tt>master</tt> (i.e., <tt>E</tt>) until |
| 611 | its current commit (<tt>C</tt>) on top of <tt>master</tt>, and record the result |
| 612 | in a new commit along with the names of the two parent commits and |
| 613 | a log message from the user describing the changes.</p></div> |
| 614 | <div class="listingblock"> |
| 615 | <div class="content"> |
| 616 | <pre><tt> A---B---C topic |
| 617 | / \ |
| 618 | D---E---F---G---H master</tt></pre> |
| 619 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 620 | <div class="paragraph"><p>The second syntax (<msg> <tt>HEAD</tt> <commit>…) is supported for |
Junio C Hamano | 1974bf2 | 2007-10-31 05:57:20 | [diff] [blame] | 621 | historical reasons. Do not use it from the command line or in |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 622 | new scripts. It is the same as <tt>git merge -m <msg> <commit>…</tt>.</p></div> |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 623 | <div class="paragraph"><p>The third syntax ("<tt>git merge --abort</tt>") can only be run after the |
| 624 | merge has resulted in conflicts. <em>git merge --abort</em> will abort the |
| 625 | merge process and try to reconstruct the pre-merge state. However, |
| 626 | if there were uncommitted changes when the merge started (and |
| 627 | especially if those changes were further modified after the merge |
| 628 | was started), <em>git merge --abort</em> will in some cases be unable to |
| 629 | reconstruct the original (pre-merge) changes. Therefore:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 630 | <div class="paragraph"><p><strong>Warning</strong>: Running <em>git merge</em> with uncommitted changes is |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 631 | discouraged: while possible, it leaves you in a state that is hard to |
| 632 | back out of in the case of a conflict.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 633 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 634 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 635 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 636 | <div class="dlist"><dl> |
| 637 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 638 | --commit |
| 639 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 640 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 641 | --no-commit |
| 642 | </dt> |
| 643 | <dd> |
| 644 | <p> |
| 645 | Perform the merge and commit the result. This option can |
| 646 | be used to override --no-commit. |
| 647 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 648 | <div class="paragraph"><p>With --no-commit perform the merge but pretend the merge |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 649 | failed and do not autocommit, to give the user a chance to |
| 650 | inspect and further tweak the merge result before committing.</p></div> |
| 651 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 652 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 653 | --ff |
| 654 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 655 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 656 | --no-ff |
| 657 | </dt> |
| 658 | <dd> |
| 659 | <p> |
| 660 | Do not generate a merge commit if the merge resolved as |
| 661 | a fast-forward, only update the branch pointer. This is |
| 662 | the default behavior of git-merge. |
| 663 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 664 | <div class="paragraph"><p>With --no-ff Generate a merge commit even if the merge |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 665 | resolved as a fast-forward.</p></div> |
| 666 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 667 | <dt class="hdlist1"> |
Junio C Hamano | 3b4609d | 2010-09-30 00:04:34 | [diff] [blame] | 668 | --log[=<n>] |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 669 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 670 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 671 | --no-log |
| 672 | </dt> |
| 673 | <dd> |
| 674 | <p> |
| 675 | In addition to branch names, populate the log message with |
Junio C Hamano | 3b4609d | 2010-09-30 00:04:34 | [diff] [blame] | 676 | one-line descriptions from at most <n> actual commits that are being |
| 677 | merged. See also <a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>. |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 678 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 679 | <div class="paragraph"><p>With --no-log do not list one-line descriptions from the |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 680 | actual commits being merged.</p></div> |
| 681 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 682 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 683 | --stat |
| 684 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 685 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 686 | -n |
| 687 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 688 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 689 | --no-stat |
| 690 | </dt> |
| 691 | <dd> |
| 692 | <p> |
| 693 | Show a diffstat at the end of the merge. The diffstat is also |
| 694 | controlled by the configuration option merge.stat. |
| 695 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 696 | <div class="paragraph"><p>With -n or --no-stat do not show a diffstat at the end of the |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 697 | merge.</p></div> |
| 698 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 699 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 700 | --squash |
| 701 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 702 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 703 | --no-squash |
| 704 | </dt> |
| 705 | <dd> |
| 706 | <p> |
| 707 | Produce the working tree and index state as if a real |
| 708 | merge happened (except for the merge information), |
| 709 | but do not actually make a commit or |
| 710 | move the <tt>HEAD</tt>, nor record <tt>$GIT_DIR/MERGE_HEAD</tt> to |
| 711 | cause the next <tt>git commit</tt> command to create a merge |
| 712 | commit. This allows you to create a single commit on |
| 713 | top of the current branch whose effect is the same as |
| 714 | merging another branch (or more in case of an octopus). |
| 715 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 716 | <div class="paragraph"><p>With --no-squash perform the merge and commit the result. This |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 717 | option can be used to override --squash.</p></div> |
| 718 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 719 | <dt class="hdlist1"> |
Junio C Hamano | 446ed77 | 2009-11-10 22:02:20 | [diff] [blame] | 720 | --ff-only |
| 721 | </dt> |
| 722 | <dd> |
| 723 | <p> |
| 724 | Refuse to merge and exit with a non-zero status unless the |
| 725 | current <tt>HEAD</tt> is already up-to-date or the merge can be |
| 726 | resolved as a fast-forward. |
| 727 | </p> |
| 728 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 729 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 730 | -s <strategy> |
| 731 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 732 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 733 | --strategy=<strategy> |
| 734 | </dt> |
| 735 | <dd> |
| 736 | <p> |
| 737 | Use the given merge strategy; can be supplied more than |
| 738 | once to specify them in the order they should be tried. |
| 739 | If there is no <tt>-s</tt> option, a built-in list of strategies |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 740 | is used instead (<em>git merge-recursive</em> when merging a single |
| 741 | head, <em>git merge-octopus</em> otherwise). |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 742 | </p> |
| 743 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 744 | <dt class="hdlist1"> |
Junio C Hamano | b04bb3f | 2010-04-14 14:07:36 | [diff] [blame] | 745 | -X <option> |
| 746 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 747 | <dt class="hdlist1"> |
Junio C Hamano | b04bb3f | 2010-04-14 14:07:36 | [diff] [blame] | 748 | --strategy-option=<option> |
| 749 | </dt> |
| 750 | <dd> |
| 751 | <p> |
| 752 | Pass merge strategy specific option through to the merge |
| 753 | strategy. |
| 754 | </p> |
| 755 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 756 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 757 | --summary |
| 758 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 759 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 760 | --no-summary |
| 761 | </dt> |
| 762 | <dd> |
| 763 | <p> |
| 764 | Synonyms to --stat and --no-stat; these are deprecated and will be |
| 765 | removed in the future. |
| 766 | </p> |
| 767 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 768 | <dt class="hdlist1"> |
Junio C Hamano | 610d176 | 2008-11-28 06:27:13 | [diff] [blame] | 769 | -q |
| 770 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 771 | <dt class="hdlist1"> |
Junio C Hamano | 610d176 | 2008-11-28 06:27:13 | [diff] [blame] | 772 | --quiet |
| 773 | </dt> |
| 774 | <dd> |
| 775 | <p> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 776 | Operate quietly. Implies --no-progress. |
Junio C Hamano | 610d176 | 2008-11-28 06:27:13 | [diff] [blame] | 777 | </p> |
| 778 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 779 | <dt class="hdlist1"> |
Junio C Hamano | 610d176 | 2008-11-28 06:27:13 | [diff] [blame] | 780 | -v |
| 781 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 782 | <dt class="hdlist1"> |
Junio C Hamano | 610d176 | 2008-11-28 06:27:13 | [diff] [blame] | 783 | --verbose |
| 784 | </dt> |
| 785 | <dd> |
| 786 | <p> |
| 787 | Be verbose. |
| 788 | </p> |
| 789 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 790 | <dt class="hdlist1"> |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 791 | --progress |
| 792 | </dt> |
| 793 | <dt class="hdlist1"> |
| 794 | --no-progress |
| 795 | </dt> |
| 796 | <dd> |
| 797 | <p> |
| 798 | Turn progress on/off explicitly. If neither is specified, |
| 799 | progress is shown if standard error is connected to a terminal. |
| 800 | Note that not all merge strategies may support progress |
| 801 | reporting. |
| 802 | </p> |
| 803 | </dd> |
| 804 | <dt class="hdlist1"> |
Junio C Hamano | 1974bf2 | 2007-10-31 05:57:20 | [diff] [blame] | 805 | -m <msg> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 806 | </dt> |
| 807 | <dd> |
| 808 | <p> |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 809 | Set the commit message to be used for the merge commit (in |
Junio C Hamano | f5de4cf | 2010-06-19 00:33:17 | [diff] [blame] | 810 | case one is created). |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 811 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 812 | <div class="paragraph"><p>If <tt>--log</tt> is specified, a shortlog of the commits being merged |
| 813 | will be appended to the specified message.</p></div> |
| 814 | <div class="paragraph"><p>The <em>git fmt-merge-msg</em> command can be |
| 815 | used to give a good default for automated <em>git merge</em> |
| 816 | invocations.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 817 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 818 | <dt class="hdlist1"> |
Junio C Hamano | 19107ef | 2010-01-19 06:20:59 | [diff] [blame] | 819 | --rerere-autoupdate |
| 820 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 821 | <dt class="hdlist1"> |
Junio C Hamano | 19107ef | 2010-01-19 06:20:59 | [diff] [blame] | 822 | --no-rerere-autoupdate |
| 823 | </dt> |
| 824 | <dd> |
| 825 | <p> |
| 826 | Allow the rerere mechanism to update the index with the |
| 827 | result of auto-conflict resolution if possible. |
| 828 | </p> |
| 829 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 830 | <dt class="hdlist1"> |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 831 | --abort |
| 832 | </dt> |
| 833 | <dd> |
| 834 | <p> |
| 835 | Abort the current conflict resolution process, and |
| 836 | try to reconstruct the pre-merge state. |
| 837 | </p> |
| 838 | <div class="paragraph"><p>If there were uncommitted worktree changes present when the merge |
| 839 | started, <em>git merge --abort</em> will in some cases be unable to |
| 840 | reconstruct these changes. It is therefore recommended to always |
| 841 | commit or stash your changes before running <em>git merge</em>.</p></div> |
| 842 | <div class="paragraph"><p><em>git merge --abort</em> is equivalent to <em>git reset --merge</em> when |
| 843 | <tt>MERGE_HEAD</tt> is present.</p></div> |
| 844 | </dd> |
| 845 | <dt class="hdlist1"> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 846 | <commit>… |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 847 | </dt> |
| 848 | <dd> |
| 849 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 850 | Commits, usually other branch heads, to merge into our branch. |
Junio C Hamano | a03ac86 | 2011-04-02 04:32:29 | [diff] [blame] | 851 | Specifying more than one commit will create a merge with |
| 852 | more than two parents (affectionately called an Octopus merge). |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 853 | </p> |
Junio C Hamano | a03ac86 | 2011-04-02 04:32:29 | [diff] [blame] | 854 | <div class="paragraph"><p>If no commit is given from the command line, and if <tt>merge.defaultToUpstream</tt> |
| 855 | configuration variable is set, merge the remote tracking branches |
| 856 | that the current branch is configured to use as its upstream. |
| 857 | See also the configuration section of this manual page.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 858 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 859 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 860 | </div> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 861 | <h2 id="_pre_merge_checks">PRE-MERGE CHECKS</h2> |
| 862 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 863 | <div class="paragraph"><p>Before applying outside changes, you should get your own work in |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 864 | good shape and committed locally, so it will not be clobbered if |
| 865 | there are conflicts. See also <a href="git-stash.html">git-stash(1)</a>. |
| 866 | <em>git pull</em> and <em>git merge</em> will stop without doing anything when |
| 867 | local uncommitted changes overlap with files that <em>git pull</em>/<em>git |
| 868 | merge</em> may need to update.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 869 | <div class="paragraph"><p>To avoid recording unrelated changes in the merge commit, |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 870 | <em>git pull</em> and <em>git merge</em> will also abort if there are any changes |
| 871 | registered in the index relative to the <tt>HEAD</tt> commit. (One |
| 872 | exception is when the changed index entries are in the state that |
| 873 | would result from the merge already.)</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 874 | <div class="paragraph"><p>If all named commits are already ancestors of <tt>HEAD</tt>, <em>git merge</em> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 875 | will exit early with the message "Already up-to-date."</p></div> |
| 876 | </div> |
| 877 | <h2 id="_fast_forward_merge">FAST-FORWARD MERGE</h2> |
| 878 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 879 | <div class="paragraph"><p>Often the current branch head is an ancestor of the named commit. |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 880 | This is the most common case especially when invoked from <em>git |
| 881 | pull</em>: you are tracking an upstream repository, you have committed |
| 882 | no local changes, and now you want to update to a newer upstream |
| 883 | revision. In this case, a new commit is not needed to store the |
| 884 | combined history; instead, the <tt>HEAD</tt> (along with the index) is |
| 885 | updated to point at the named commit, without creating an extra |
| 886 | merge commit.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 887 | <div class="paragraph"><p>This behavior can be suppressed with the <tt>--no-ff</tt> option.</p></div> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 888 | </div> |
| 889 | <h2 id="_true_merge">TRUE MERGE</h2> |
| 890 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 891 | <div class="paragraph"><p>Except in a fast-forward merge (see above), the branches to be |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 892 | merged must be tied together by a merge commit that has both of them |
| 893 | as its parents.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 894 | <div class="paragraph"><p>A merged version reconciling the changes from all branches to be |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 895 | merged is committed, and your <tt>HEAD</tt>, index, and working tree are |
| 896 | updated to it. It is possible to have modifications in the working |
| 897 | tree as long as they do not overlap; the update will preserve them.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 898 | <div class="paragraph"><p>When it is not obvious how to reconcile the changes, the following |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 899 | happens:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 900 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 901 | <li> |
| 902 | <p> |
| 903 | The <tt>HEAD</tt> pointer stays the same. |
| 904 | </p> |
| 905 | </li> |
| 906 | <li> |
| 907 | <p> |
| 908 | The <tt>MERGE_HEAD</tt> ref is set to point to the other branch head. |
| 909 | </p> |
| 910 | </li> |
| 911 | <li> |
| 912 | <p> |
| 913 | Paths that merged cleanly are updated both in the index file and |
| 914 | in your working tree. |
| 915 | </p> |
| 916 | </li> |
| 917 | <li> |
| 918 | <p> |
| 919 | For conflicting paths, the index file records up to three |
| 920 | versions: stage 1 stores the version from the common ancestor, |
| 921 | stage 2 from <tt>HEAD</tt>, and stage 3 from <tt>MERGE_HEAD</tt> (you |
| 922 | can inspect the stages with <tt>git ls-files -u</tt>). The working |
| 923 | tree files contain the result of the "merge" program; i.e. 3-way |
| 924 | merge results with familiar conflict markers <tt><<<</tt> <tt>===</tt> <tt>>>></tt>. |
| 925 | </p> |
| 926 | </li> |
| 927 | <li> |
| 928 | <p> |
| 929 | No other changes are made. In particular, the local |
| 930 | modifications you had before you started merge will stay the |
| 931 | same and the index entries for them stay as they were, |
| 932 | i.e. matching <tt>HEAD</tt>. |
| 933 | </p> |
| 934 | </li> |
| 935 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 936 | <div class="paragraph"><p>If you tried a merge which resulted in complex conflicts and |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 937 | want to start over, you can recover with <tt>git merge --abort</tt>.</p></div> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 938 | </div> |
| 939 | <h2 id="_how_conflicts_are_presented">HOW CONFLICTS ARE PRESENTED</h2> |
| 940 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 941 | <div class="paragraph"><p>During a merge, the working tree files are updated to reflect the result |
| 942 | of the merge. Among the changes made to the common ancestor’s version, |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 943 | non-overlapping ones (that is, you changed an area of the file while the |
| 944 | other side left that area intact, or vice versa) are incorporated in the |
| 945 | final result verbatim. When both sides made changes to the same area, |
| 946 | however, git cannot randomly pick one side over the other, and asks you to |
| 947 | resolve it by leaving what both sides did to that area.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 948 | <div class="paragraph"><p>By default, git uses the same style as that is used by "merge" program |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 949 | from the RCS suite to present such a conflicted hunk, like this:</p></div> |
| 950 | <div class="listingblock"> |
| 951 | <div class="content"> |
| 952 | <pre><tt>Here are lines that are either unchanged from the common |
| 953 | ancestor, or cleanly resolved because only one side changed. |
| 954 | <<<<<<< yours:sample.txt |
| 955 | Conflict resolution is hard; |
| 956 | let's go shopping. |
| 957 | ======= |
| 958 | Git makes conflict resolution easy. |
| 959 | >>>>>>> theirs:sample.txt |
| 960 | And here is another line that is cleanly resolved or unmodified.</tt></pre> |
| 961 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 962 | <div class="paragraph"><p>The area where a pair of conflicting changes happened is marked with markers |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 963 | <tt><<<<<<<</tt>, <tt>=======</tt>, and <tt>>>>>>>></tt>. The part before the <tt>=======</tt> |
| 964 | is typically your side, and the part afterwards is typically their side.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 965 | <div class="paragraph"><p>The default format does not show what the original said in the conflicting |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 966 | area. You cannot tell how many lines are deleted and replaced with |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 967 | Barbie’s remark on your side. The only thing you can tell is that your |
| 968 | side wants to say it is hard and you’d prefer to go shopping, while the |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 969 | other side wants to claim it is easy.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 970 | <div class="paragraph"><p>An alternative style can be used by setting the "merge.conflictstyle" |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 971 | configuration variable to "diff3". In "diff3" style, the above conflict |
| 972 | may look like this:</p></div> |
| 973 | <div class="listingblock"> |
| 974 | <div class="content"> |
| 975 | <pre><tt>Here are lines that are either unchanged from the common |
| 976 | ancestor, or cleanly resolved because only one side changed. |
| 977 | <<<<<<< yours:sample.txt |
| 978 | Conflict resolution is hard; |
| 979 | let's go shopping. |
| 980 | ||||||| |
| 981 | Conflict resolution is hard. |
| 982 | ======= |
| 983 | Git makes conflict resolution easy. |
| 984 | >>>>>>> theirs:sample.txt |
| 985 | And here is another line that is cleanly resolved or unmodified.</tt></pre> |
| 986 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 987 | <div class="paragraph"><p>In addition to the <tt><<<<<<<</tt>, <tt>=======</tt>, and <tt>>>>>>>></tt> markers, it uses |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 988 | another <tt>|||||||</tt> marker that is followed by the original text. You can |
| 989 | tell that the original just stated a fact, and your side simply gave in to |
| 990 | that statement and gave up, while the other side tried to have a more |
| 991 | positive attitude. You can sometimes come up with a better resolution by |
| 992 | viewing the original.</p></div> |
| 993 | </div> |
| 994 | <h2 id="_how_to_resolve_conflicts">HOW TO RESOLVE CONFLICTS</h2> |
| 995 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 996 | <div class="paragraph"><p>After seeing a conflict, you can do two things:</p></div> |
| 997 | <div class="ulist"><ul> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 998 | <li> |
| 999 | <p> |
| 1000 | Decide not to merge. The only clean-ups you need are to reset |
| 1001 | the index file to the <tt>HEAD</tt> commit to reverse 2. and to clean |
Junio C Hamano | 788eeba | 2010-12-08 22:50:43 | [diff] [blame] | 1002 | up working tree changes made by 2. and 3.; <tt>git merge --abort</tt> |
| 1003 | can be used for this. |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1004 | </p> |
| 1005 | </li> |
| 1006 | <li> |
| 1007 | <p> |
| 1008 | Resolve the conflicts. Git will mark the conflicts in |
| 1009 | the working tree. Edit the files into shape and |
| 1010 | <em>git add</em> them to the index. Use <em>git commit</em> to seal the deal. |
| 1011 | </p> |
| 1012 | </li> |
| 1013 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1014 | <div class="paragraph"><p>You can work through the conflict with a number of tools:</p></div> |
| 1015 | <div class="ulist"><ul> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1016 | <li> |
| 1017 | <p> |
| 1018 | Use a mergetool. <tt>git mergetool</tt> to launch a graphical |
| 1019 | mergetool which will work you through the merge. |
| 1020 | </p> |
| 1021 | </li> |
| 1022 | <li> |
| 1023 | <p> |
| 1024 | Look at the diffs. <tt>git diff</tt> will show a three-way diff, |
| 1025 | highlighting changes from both the <tt>HEAD</tt> and <tt>MERGE_HEAD</tt> |
| 1026 | versions. |
| 1027 | </p> |
| 1028 | </li> |
| 1029 | <li> |
| 1030 | <p> |
| 1031 | Look at the diffs from each branch. <tt>git log --merge -p <path></tt> |
| 1032 | will show diffs first for the <tt>HEAD</tt> version and then the |
| 1033 | <tt>MERGE_HEAD</tt> version. |
| 1034 | </p> |
| 1035 | </li> |
| 1036 | <li> |
| 1037 | <p> |
| 1038 | Look at the originals. <tt>git show :1:filename</tt> shows the |
| 1039 | common ancestor, <tt>git show :2:filename</tt> shows the <tt>HEAD</tt> |
| 1040 | version, and <tt>git show :3:filename</tt> shows the <tt>MERGE_HEAD</tt> |
| 1041 | version. |
| 1042 | </p> |
| 1043 | </li> |
| 1044 | </ul></div> |
| 1045 | </div> |
| 1046 | <h2 id="_examples">EXAMPLES</h2> |
| 1047 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1048 | <div class="ulist"><ul> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1049 | <li> |
| 1050 | <p> |
| 1051 | Merge branches <tt>fixes</tt> and <tt>enhancements</tt> on top of |
| 1052 | the current branch, making an octopus merge: |
| 1053 | </p> |
| 1054 | <div class="listingblock"> |
| 1055 | <div class="content"> |
| 1056 | <pre><tt>$ git merge fixes enhancements</tt></pre> |
| 1057 | </div></div> |
| 1058 | </li> |
| 1059 | <li> |
| 1060 | <p> |
| 1061 | Merge branch <tt>obsolete</tt> into the current branch, using <tt>ours</tt> |
| 1062 | merge strategy: |
| 1063 | </p> |
| 1064 | <div class="listingblock"> |
| 1065 | <div class="content"> |
| 1066 | <pre><tt>$ git merge -s ours obsolete</tt></pre> |
| 1067 | </div></div> |
| 1068 | </li> |
| 1069 | <li> |
| 1070 | <p> |
| 1071 | Merge branch <tt>maint</tt> into the current branch, but do not make |
| 1072 | a new commit automatically: |
| 1073 | </p> |
| 1074 | <div class="listingblock"> |
| 1075 | <div class="content"> |
| 1076 | <pre><tt>$ git merge --no-commit maint</tt></pre> |
| 1077 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1078 | <div class="paragraph"><p>This can be used when you want to include further changes to the |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1079 | merge, or want to write your own merge commit message.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1080 | <div class="paragraph"><p>You should refrain from abusing this option to sneak substantial |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1081 | changes into a merge commit. Small fixups like bumping |
| 1082 | release/version name would be acceptable.</p></div> |
| 1083 | </li> |
| 1084 | </ul></div> |
| 1085 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1086 | <h2 id="_merge_strategies">MERGE STRATEGIES</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1087 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1088 | <div class="paragraph"><p>The merge mechanism (<em>git-merge</em> and <em>git-pull</em> commands) allows the |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1089 | backend <em>merge strategies</em> to be chosen with <tt>-s</tt> option. Some strategies |
| 1090 | can also take their own options, which can be passed by giving <tt>-X<option></tt> |
| 1091 | arguments to <em>git-merge</em> and/or <em>git-pull</em>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1092 | <div class="dlist"><dl> |
| 1093 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1094 | resolve |
| 1095 | </dt> |
| 1096 | <dd> |
| 1097 | <p> |
| 1098 | This can only resolve two heads (i.e. the current branch |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 1099 | and another branch you pulled from) using a 3-way merge |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1100 | algorithm. It tries to carefully detect criss-cross |
| 1101 | merge ambiguities and is considered generally safe and |
| 1102 | fast. |
| 1103 | </p> |
| 1104 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1105 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1106 | recursive |
| 1107 | </dt> |
| 1108 | <dd> |
| 1109 | <p> |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 1110 | This can only resolve two heads using a 3-way merge |
| 1111 | algorithm. When there is more than one common |
| 1112 | ancestor that can be used for 3-way merge, it creates a |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1113 | merged tree of the common ancestors and uses that as |
| 1114 | the reference tree for the 3-way merge. This has been |
| 1115 | reported to result in fewer merge conflicts without |
| 1116 | causing mis-merges by tests done on actual merge commits |
| 1117 | taken from Linux 2.6 kernel development history. |
| 1118 | Additionally this can detect and handle merges involving |
| 1119 | renames. This is the default merge strategy when |
| 1120 | pulling or merging one branch. |
| 1121 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1122 | <div class="paragraph"><p>The <em>recursive</em> strategy can take the following options:</p></div> |
| 1123 | <div class="dlist"><dl> |
| 1124 | <dt class="hdlist1"> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1125 | ours |
| 1126 | </dt> |
| 1127 | <dd> |
| 1128 | <p> |
| 1129 | This option forces conflicting hunks to be auto-resolved cleanly by |
| 1130 | favoring <em>our</em> version. Changes from the other tree that do not |
| 1131 | conflict with our side are reflected to the merge result. |
| 1132 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1133 | <div class="paragraph"><p>This should not be confused with the <em>ours</em> merge strategy, which does not |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1134 | even look at what the other tree contains at all. It discards everything |
| 1135 | the other tree did, declaring <em>our</em> history contains all that happened in it.</p></div> |
| 1136 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1137 | <dt class="hdlist1"> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1138 | theirs |
| 1139 | </dt> |
| 1140 | <dd> |
| 1141 | <p> |
| 1142 | This is opposite of <em>ours</em>. |
| 1143 | </p> |
| 1144 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1145 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1146 | patience |
| 1147 | </dt> |
| 1148 | <dd> |
| 1149 | <p> |
| 1150 | With this option, <em>merge-recursive</em> spends a little extra time |
| 1151 | to avoid mismerges that sometimes occur due to unimportant |
| 1152 | matching lines (e.g., braces from distinct functions). Use |
| 1153 | this when the branches to be merged have diverged wildly. |
| 1154 | See also <a href="git-diff.html">git-diff(1)</a> <tt>--patience</tt>. |
| 1155 | </p> |
| 1156 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1157 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1158 | ignore-space-change |
| 1159 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1160 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1161 | ignore-all-space |
| 1162 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1163 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1164 | ignore-space-at-eol |
| 1165 | </dt> |
| 1166 | <dd> |
| 1167 | <p> |
| 1168 | Treats lines with the indicated type of whitespace change as |
| 1169 | unchanged for the sake of a three-way merge. Whitespace |
| 1170 | changes mixed with other changes to a line are not ignored. |
| 1171 | See also <a href="git-diff.html">git-diff(1)</a> <tt>-b</tt>, <tt>-w</tt>, and |
| 1172 | <tt>--ignore-space-at-eol</tt>. |
| 1173 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1174 | <div class="ulist"><ul> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1175 | <li> |
| 1176 | <p> |
| 1177 | If <em>their</em> version only introduces whitespace changes to a line, |
| 1178 | <em>our</em> version is used; |
| 1179 | </p> |
| 1180 | </li> |
| 1181 | <li> |
| 1182 | <p> |
| 1183 | If <em>our</em> version introduces whitespace changes but <em>their</em> |
| 1184 | version includes a substantial change, <em>their</em> version is used; |
| 1185 | </p> |
| 1186 | </li> |
| 1187 | <li> |
| 1188 | <p> |
| 1189 | Otherwise, the merge proceeds in the usual way. |
| 1190 | </p> |
| 1191 | </li> |
| 1192 | </ul></div> |
| 1193 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1194 | <dt class="hdlist1"> |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 1195 | renormalize |
| 1196 | </dt> |
| 1197 | <dd> |
| 1198 | <p> |
| 1199 | This runs a virtual check-out and check-in of all three stages |
| 1200 | of a file when resolving a three-way merge. This option is |
| 1201 | meant to be used when merging branches with different clean |
| 1202 | filters or end-of-line normalization rules. See "Merging |
| 1203 | branches with differing checkin/checkout attributes" in |
| 1204 | <a href="gitattributes.html">gitattributes(5)</a> for details. |
| 1205 | </p> |
| 1206 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1207 | <dt class="hdlist1"> |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 1208 | no-renormalize |
| 1209 | </dt> |
| 1210 | <dd> |
| 1211 | <p> |
| 1212 | Disables the <tt>renormalize</tt> option. This overrides the |
| 1213 | <tt>merge.renormalize</tt> configuration variable. |
| 1214 | </p> |
| 1215 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1216 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1217 | rename-threshold=<n> |
| 1218 | </dt> |
| 1219 | <dd> |
| 1220 | <p> |
| 1221 | Controls the similarity threshold used for rename detection. |
| 1222 | See also <a href="git-diff.html">git-diff(1)</a> <tt>-M</tt>. |
| 1223 | </p> |
| 1224 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1225 | <dt class="hdlist1"> |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1226 | subtree[=<path>] |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1227 | </dt> |
| 1228 | <dd> |
| 1229 | <p> |
| 1230 | This option is a more advanced form of <em>subtree</em> strategy, where |
| 1231 | the strategy makes a guess on how two trees must be shifted to |
| 1232 | match with each other when merging. Instead, the specified path |
| 1233 | is prefixed (or stripped from the beginning) to make the shape of |
| 1234 | two trees to match. |
| 1235 | </p> |
| 1236 | </dd> |
| 1237 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1238 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1239 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1240 | octopus |
| 1241 | </dt> |
| 1242 | <dd> |
| 1243 | <p> |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 1244 | This resolves cases with more than two heads, but refuses to do |
| 1245 | a complex merge that needs manual resolution. It is |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1246 | primarily meant to be used for bundling topic branch |
| 1247 | heads together. This is the default merge strategy when |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 1248 | pulling or merging more than one branch. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1249 | </p> |
| 1250 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1251 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1252 | ours |
| 1253 | </dt> |
| 1254 | <dd> |
| 1255 | <p> |
Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 1256 | This resolves any number of heads, but the resulting tree of the |
| 1257 | merge is always that of the current branch head, effectively |
| 1258 | ignoring all changes from all other branches. It is meant to |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1259 | be used to supersede old development history of side |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1260 | branches. Note that this is different from the -Xours option to |
| 1261 | the <em>recursive</em> merge strategy. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1262 | </p> |
| 1263 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1264 | <dt class="hdlist1"> |
Junio C Hamano | e6c9203 | 2008-03-19 09:24:34 | [diff] [blame] | 1265 | subtree |
| 1266 | </dt> |
| 1267 | <dd> |
| 1268 | <p> |
| 1269 | This is a modified recursive strategy. When merging trees A and |
| 1270 | B, if B corresponds to a subtree of A, B is first adjusted to |
| 1271 | match the tree structure of A, instead of reading the trees at |
| 1272 | the same level. This adjustment is also done to the common |
| 1273 | ancestor tree. |
| 1274 | </p> |
| 1275 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1276 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1277 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1278 | <h2 id="_configuration">CONFIGURATION</h2> |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1279 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1280 | <div class="dlist"><dl> |
| 1281 | <dt class="hdlist1"> |
Junio C Hamano | 4653c6f | 2008-11-26 22:50:20 | [diff] [blame] | 1282 | merge.conflictstyle |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1283 | </dt> |
| 1284 | <dd> |
| 1285 | <p> |
Junio C Hamano | 4653c6f | 2008-11-26 22:50:20 | [diff] [blame] | 1286 | Specify the style in which conflicted hunks are written out to |
| 1287 | working tree files upon merge. The default is "merge", which |
Junio C Hamano | ec87f52 | 2008-12-10 08:35:25 | [diff] [blame] | 1288 | shows a <tt><<<<<<<</tt> conflict marker, changes made by one side, |
| 1289 | a <tt>=======</tt> marker, changes made by the other side, and then |
| 1290 | a <tt>>>>>>>></tt> marker. An alternate style, "diff3", adds a <tt>|||||||</tt> |
| 1291 | marker and the original text before the <tt>=======</tt> marker. |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1292 | </p> |
| 1293 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1294 | <dt class="hdlist1"> |
Junio C Hamano | a03ac86 | 2011-04-02 04:32:29 | [diff] [blame] | 1295 | merge.defaultToUpstream |
| 1296 | </dt> |
| 1297 | <dd> |
| 1298 | <p> |
| 1299 | If merge is called without any commit argument, merge the upstream |
| 1300 | branches configured for the current branch by using their last |
| 1301 | observed values stored in their remote tracking branches. |
| 1302 | The values of the <tt>branch.<current branch>.merge</tt> that name the |
| 1303 | branches at the remote named by <tt>branch.<current branch>.remote</tt> |
| 1304 | are consulted, and then they are mapped via <tt>remote.<remote>.fetch</tt> |
| 1305 | to their corresponding remote tracking branches, and the tips of |
| 1306 | these tracking branches are merged. |
| 1307 | </p> |
| 1308 | </dd> |
| 1309 | <dt class="hdlist1"> |
Junio C Hamano | 3d050d6 | 2011-05-17 06:43:34 | [diff] [blame] | 1310 | merge.ff |
| 1311 | </dt> |
| 1312 | <dd> |
| 1313 | <p> |
| 1314 | By default, git does not create an extra merge commit when merging |
| 1315 | a commit that is a descendant of the current commit. Instead, the |
| 1316 | tip of the current branch is fast-forwarded. When set to <tt>false</tt>, |
| 1317 | this variable tells git to create an extra merge commit in such |
| 1318 | a case (equivalent to giving the <tt>--no-ff</tt> option from the command |
| 1319 | line). When set to <tt>only</tt>, only such fast-forward merges are |
| 1320 | allowed (equivalent to giving the <tt>--ff-only</tt> option from the |
| 1321 | command line). |
| 1322 | </p> |
| 1323 | </dd> |
| 1324 | <dt class="hdlist1"> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1325 | merge.log |
| 1326 | </dt> |
| 1327 | <dd> |
| 1328 | <p> |
Junio C Hamano | 3b4609d | 2010-09-30 00:04:34 | [diff] [blame] | 1329 | In addition to branch names, populate the log message with at |
| 1330 | most the specified number of one-line descriptions from the |
| 1331 | actual commits that are being merged. Defaults to false, and |
Junio C Hamano | 7165bf7 | 2011-01-04 22:06:18 | [diff] [blame] | 1332 | true is a synonym for 20. |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1333 | </p> |
| 1334 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1335 | <dt class="hdlist1"> |
Junio C Hamano | 2fbcd21 | 2008-05-14 22:26:07 | [diff] [blame] | 1336 | merge.renameLimit |
| 1337 | </dt> |
| 1338 | <dd> |
| 1339 | <p> |
| 1340 | The number of files to consider when performing rename detection |
| 1341 | during a merge; if not specified, defaults to the value of |
| 1342 | diff.renameLimit. |
| 1343 | </p> |
| 1344 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1345 | <dt class="hdlist1"> |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 1346 | merge.renormalize |
| 1347 | </dt> |
| 1348 | <dd> |
| 1349 | <p> |
| 1350 | Tell git that canonical representation of files in the |
| 1351 | repository has changed over time (e.g. earlier commits record |
| 1352 | text files with CRLF line endings, but recent ones use LF line |
| 1353 | endings). In such a repository, git can convert the data |
| 1354 | recorded in commits to a canonical form before performing a |
| 1355 | merge to reduce unnecessary conflicts. For more information, |
| 1356 | see section "Merging branches with differing checkin/checkout |
| 1357 | attributes" in <a href="gitattributes.html">gitattributes(5)</a>. |
| 1358 | </p> |
| 1359 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1360 | <dt class="hdlist1"> |
Junio C Hamano | 4653c6f | 2008-11-26 22:50:20 | [diff] [blame] | 1361 | merge.stat |
| 1362 | </dt> |
| 1363 | <dd> |
| 1364 | <p> |
| 1365 | Whether to print the diffstat between ORIG_HEAD and the merge result |
| 1366 | at the end of the merge. True by default. |
| 1367 | </p> |
| 1368 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1369 | <dt class="hdlist1"> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1370 | merge.tool |
| 1371 | </dt> |
| 1372 | <dd> |
| 1373 | <p> |
| 1374 | Controls which merge resolution program is used by |
Junio C Hamano | d2c978f | 2011-03-20 19:42:22 | [diff] [blame] | 1375 | <a href="git-mergetool.html">git-mergetool(1)</a>. Valid built-in values are: "araxis", |
| 1376 | "bc3", "diffuse", "ecmerge", "emerge", "gvimdiff", "kdiff3", "meld", |
| 1377 | "opendiff", "p4merge", "tkdiff", "tortoisemerge", "vimdiff" |
| 1378 | and "xxdiff". Any other value is treated is custom merge tool |
Junio C Hamano | cb1c44f | 2008-08-06 06:19:33 | [diff] [blame] | 1379 | and there must be a corresponding mergetool.<tool>.cmd option. |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1380 | </p> |
| 1381 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1382 | <dt class="hdlist1"> |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1383 | merge.verbosity |
| 1384 | </dt> |
| 1385 | <dd> |
| 1386 | <p> |
| 1387 | Controls the amount of output shown by the recursive merge |
| 1388 | strategy. Level 0 outputs nothing except a final error |
| 1389 | message if conflicts were detected. Level 1 outputs only |
| 1390 | conflicts, 2 outputs conflicts and file changes. Level 5 and |
| 1391 | above outputs debugging information. The default is level 2. |
Junio C Hamano | ec87f52 | 2008-12-10 08:35:25 | [diff] [blame] | 1392 | Can be overridden by the <em>GIT_MERGE_VERBOSITY</em> environment variable. |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1393 | </p> |
| 1394 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1395 | <dt class="hdlist1"> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1396 | merge.<driver>.name |
| 1397 | </dt> |
| 1398 | <dd> |
| 1399 | <p> |
Junio C Hamano | ec87f52 | 2008-12-10 08:35:25 | [diff] [blame] | 1400 | Defines a human-readable name for a custom low-level |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1401 | merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details. |
| 1402 | </p> |
| 1403 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1404 | <dt class="hdlist1"> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1405 | merge.<driver>.driver |
| 1406 | </dt> |
| 1407 | <dd> |
| 1408 | <p> |
| 1409 | Defines the command that implements a custom low-level |
| 1410 | merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details. |
| 1411 | </p> |
| 1412 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1413 | <dt class="hdlist1"> |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 1414 | merge.<driver>.recursive |
| 1415 | </dt> |
| 1416 | <dd> |
| 1417 | <p> |
| 1418 | Names a low-level merge driver to be used when |
| 1419 | performing an internal merge between common ancestors. |
| 1420 | See <a href="gitattributes.html">gitattributes(5)</a> for details. |
| 1421 | </p> |
| 1422 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1423 | <dt class="hdlist1"> |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 1424 | branch.<name>.mergeoptions |
| 1425 | </dt> |
| 1426 | <dd> |
| 1427 | <p> |
| 1428 | Sets default options for merging into branch <name>. The syntax and |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 1429 | supported options are the same as those of <em>git merge</em>, but option |
| 1430 | values containing whitespace characters are currently not supported. |
Junio C Hamano | 1b50ce9 | 2007-10-03 12:05:53 | [diff] [blame] | 1431 | </p> |
| 1432 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1433 | </dl></div> |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 1434 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1435 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1436 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1437 | <div class="paragraph"><p><a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>, <a href="git-pull.html">git-pull(1)</a>, |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1438 | <a href="gitattributes.html">gitattributes(5)</a>, |
| 1439 | <a href="git-reset.html">git-reset(1)</a>, |
| 1440 | <a href="git-diff.html">git-diff(1)</a>, <a href="git-ls-files.html">git-ls-files(1)</a>, |
| 1441 | <a href="git-add.html">git-add(1)</a>, <a href="git-rm.html">git-rm(1)</a>, |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1442 | <a href="git-mergetool.html">git-mergetool(1)</a></p></div> |
Junio C Hamano | fa2ad88 | 2009-12-03 09:15:44 | [diff] [blame] | 1443 | </div> |
Junio C Hamano | fa2ad88 | 2009-12-03 09:15:44 | [diff] [blame] | 1444 | <h2 id="_git">GIT</h2> |
| 1445 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1446 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | fa2ad88 | 2009-12-03 09:15:44 | [diff] [blame] | 1447 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 1448 | </div> |
| 1449 | <div id="footnotes"><hr /></div> |
Junio C Hamano | fa2ad88 | 2009-12-03 09:15:44 | [diff] [blame] | 1450 | <div id="footer"> |
| 1451 | <div id="footer-text"> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame^] | 1452 | Last updated 2011-09-21 23:01:14 PDT |
Junio C Hamano | fa2ad88 | 2009-12-03 09:15:44 | [diff] [blame] | 1453 | </div> |
| 1454 | </div> |
| 1455 | </body> |
| 1456 | </html> |