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-rebase(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-rebase(1) Manual Page |
| 574 | </h1> |
| 575 | <h2>NAME</h2> |
| 576 | <div class="sectionbody"> |
| 577 | <p>git-rebase - |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 578 | Forward-port local commits to the updated upstream head |
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 | a9b8d24 | 2007-05-19 04:51:55 | [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 rebase</em> [-i | --interactive] [options] [--onto <newbase>] |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 587 | [<upstream>] [<branch>] |
Junio C Hamano | bd53dbf | 2009-01-18 18:26:37 | [diff] [blame] | 588 | <em>git rebase</em> [-i | --interactive] [options] --onto <newbase> |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 589 | --root [<branch>] |
| 590 | <em>git rebase</em> --continue | --skip | --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>If <branch> is specified, <em>git rebase</em> will perform an automatic |
Junio C Hamano | 89d4e0f | 2007-02-18 00:34:59 | [diff] [blame] | 597 | <tt>git checkout <branch></tt> before doing anything else. Otherwise |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 598 | it remains on the current branch.</p></div> |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 599 | <div class="paragraph"><p>If <upstream> is not specified, the upstream configured in |
| 600 | branch.<name>.remote and branch.<name>.merge options will be used; see |
| 601 | <a href="git-config.html">git-config(1)</a> for details. If you are currently not on any |
| 602 | branch or if the current branch does not have a configured upstream, |
| 603 | the rebase will abort.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 604 | <div class="paragraph"><p>All changes made by commits in the current branch but that are not |
Junio C Hamano | 89d4e0f | 2007-02-18 00:34:59 | [diff] [blame] | 605 | in <upstream> are saved to a temporary area. This is the same set |
Junio C Hamano | bd53dbf | 2009-01-18 18:26:37 | [diff] [blame] | 606 | of commits that would be shown by <tt>git log <upstream>..HEAD</tt> (or |
| 607 | <tt>git log HEAD</tt>, if --root is specified).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 608 | <div class="paragraph"><p>The current branch is reset to <upstream>, or <newbase> if the |
Junio C Hamano | 89d4e0f | 2007-02-18 00:34:59 | [diff] [blame] | 609 | --onto option was supplied. This has the exact same effect as |
Junio C Hamano | 38ddcce | 2008-07-15 15:49:03 | [diff] [blame] | 610 | <tt>git reset --hard <upstream></tt> (or <newbase>). ORIG_HEAD is set |
| 611 | to point at the tip of the branch before the reset.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 612 | <div class="paragraph"><p>The commits that were previously saved into the temporary area are |
Junio C Hamano | 764a667 | 2007-10-23 01:23:31 | [diff] [blame] | 613 | then reapplied to the current branch, one by one, in order. Note that |
| 614 | any commits in HEAD which introduce the same textual changes as a commit |
| 615 | in HEAD..<upstream> are omitted (i.e., a patch already accepted upstream |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 616 | with a different commit message or timestamp will be skipped).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 617 | <div class="paragraph"><p>It is possible that a merge failure will prevent this process from being |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 618 | completely automatic. You will have to resolve any such merge failure |
Junio C Hamano | 6959c6c | 2006-05-17 10:34:11 | [diff] [blame] | 619 | and run <tt>git rebase --continue</tt>. Another option is to bypass the commit |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 620 | that caused the merge failure with <tt>git rebase --skip</tt>. To check out the |
Junio C Hamano | 0868a30 | 2008-07-22 09:20:44 | [diff] [blame] | 621 | original <branch> and remove the .git/rebase-apply working files, use the |
| 622 | command <tt>git rebase --abort</tt> instead.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 623 | <div class="paragraph"><p>Assume the following history exists and the current branch is "topic":</p></div> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 624 | <div class="listingblock"> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 625 | <div class="content"> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 626 | <pre><tt> A---B---C topic |
| 627 | / |
| 628 | D---E---F---G master</tt></pre> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 629 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 630 | <div class="paragraph"><p>From this point, the result of either of the following commands:</p></div> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 631 | <div class="literalblock"> |
| 632 | <div class="content"> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 633 | <pre><tt>git rebase master |
| 634 | git rebase master topic</tt></pre> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 635 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 636 | <div class="paragraph"><p>would be:</p></div> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 637 | <div class="listingblock"> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 638 | <div class="content"> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 639 | <pre><tt> A'--B'--C' topic |
| 640 | / |
| 641 | D---E---F---G master</tt></pre> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 642 | </div></div> |
Junio C Hamano | 92faa80 | 2011-03-15 01:00:18 | [diff] [blame] | 643 | <div class="paragraph"><p><strong>NOTE:</strong> The latter form is just a short-hand of <tt>git checkout topic</tt> |
| 644 | followed by <tt>git rebase master</tt>. When rebase exits <tt>topic</tt> will |
| 645 | remain the checked-out branch.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 646 | <div class="paragraph"><p>If the upstream branch already contains a change you have made (e.g., |
Junio C Hamano | 764a667 | 2007-10-23 01:23:31 | [diff] [blame] | 647 | because you mailed a patch which was applied upstream), then that commit |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 648 | will be skipped. For example, running ‘git rebase master` on the |
| 649 | following history (in which A’ and A introduce the same set of changes, |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 650 | but have different committer information):</p></div> |
Junio C Hamano | 764a667 | 2007-10-23 01:23:31 | [diff] [blame] | 651 | <div class="listingblock"> |
| 652 | <div class="content"> |
| 653 | <pre><tt> A---B---C topic |
| 654 | / |
| 655 | D---E---A'---F master</tt></pre> |
| 656 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 657 | <div class="paragraph"><p>will result in:</p></div> |
Junio C Hamano | 764a667 | 2007-10-23 01:23:31 | [diff] [blame] | 658 | <div class="listingblock"> |
| 659 | <div class="content"> |
| 660 | <pre><tt> B'---C' topic |
| 661 | / |
| 662 | D---E---A'---F master</tt></pre> |
| 663 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 664 | <div class="paragraph"><p>Here is how you would transplant a topic branch based on one |
Junio C Hamano | d8c9d43 | 2006-11-07 07:19:13 | [diff] [blame] | 665 | branch to another, to pretend that you forked the topic branch |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 666 | from the latter branch, using <tt>rebase --onto</tt>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 667 | <div class="paragraph"><p>First let’s assume your <em>topic</em> is based on branch <em>next</em>. |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 668 | For example, a feature developed in <em>topic</em> depends on some |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 669 | functionality which is found in <em>next</em>.</p></div> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 670 | <div class="listingblock"> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 671 | <div class="content"> |
Junio C Hamano | d8c9d43 | 2006-11-07 07:19:13 | [diff] [blame] | 672 | <pre><tt> o---o---o---o---o master |
| 673 | \ |
| 674 | o---o---o---o---o next |
| 675 | \ |
| 676 | o---o---o topic</tt></pre> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 677 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 678 | <div class="paragraph"><p>We want to make <em>topic</em> forked from branch <em>master</em>; for example, |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 679 | because the functionality on which <em>topic</em> depends was merged into the |
| 680 | more stable <em>master</em> branch. We want our tree to look like this:</p></div> |
Junio C Hamano | d8c9d43 | 2006-11-07 07:19:13 | [diff] [blame] | 681 | <div class="listingblock"> |
| 682 | <div class="content"> |
| 683 | <pre><tt> o---o---o---o---o master |
| 684 | | \ |
| 685 | | o'--o'--o' topic |
| 686 | \ |
| 687 | o---o---o---o---o next</tt></pre> |
| 688 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 689 | <div class="paragraph"><p>We can get this using the following command:</p></div> |
Junio C Hamano | d8c9d43 | 2006-11-07 07:19:13 | [diff] [blame] | 690 | <div class="literalblock"> |
| 691 | <div class="content"> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 692 | <pre><tt>git rebase --onto master next topic</tt></pre> |
Junio C Hamano | d8c9d43 | 2006-11-07 07:19:13 | [diff] [blame] | 693 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 694 | <div class="paragraph"><p>Another example of --onto option is to rebase part of a |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 695 | branch. If we have the following situation:</p></div> |
Junio C Hamano | d8c9d43 | 2006-11-07 07:19:13 | [diff] [blame] | 696 | <div class="listingblock"> |
| 697 | <div class="content"> |
| 698 | <pre><tt> H---I---J topicB |
| 699 | / |
| 700 | E---F---G topicA |
| 701 | / |
| 702 | A---B---C---D master</tt></pre> |
| 703 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 704 | <div class="paragraph"><p>then the command</p></div> |
Junio C Hamano | d8c9d43 | 2006-11-07 07:19:13 | [diff] [blame] | 705 | <div class="literalblock"> |
| 706 | <div class="content"> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 707 | <pre><tt>git rebase --onto master topicA topicB</tt></pre> |
Junio C Hamano | d8c9d43 | 2006-11-07 07:19:13 | [diff] [blame] | 708 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 709 | <div class="paragraph"><p>would result in:</p></div> |
Junio C Hamano | d8c9d43 | 2006-11-07 07:19:13 | [diff] [blame] | 710 | <div class="listingblock"> |
| 711 | <div class="content"> |
| 712 | <pre><tt> H'--I'--J' topicB |
| 713 | / |
| 714 | | E---F---G topicA |
| 715 | |/ |
| 716 | A---B---C---D master</tt></pre> |
| 717 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 718 | <div class="paragraph"><p>This is useful when topicB does not depend on topicA.</p></div> |
| 719 | <div class="paragraph"><p>A range of commits could also be removed with rebase. If we have |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 720 | the following situation:</p></div> |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 721 | <div class="listingblock"> |
| 722 | <div class="content"> |
| 723 | <pre><tt> E---F---G---H---I---J topicA</tt></pre> |
| 724 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 725 | <div class="paragraph"><p>then the command</p></div> |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 726 | <div class="literalblock"> |
| 727 | <div class="content"> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 728 | <pre><tt>git rebase --onto topicA~5 topicA~3 topicA</tt></pre> |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 729 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 730 | <div class="paragraph"><p>would result in the removal of commits F and G:</p></div> |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 731 | <div class="listingblock"> |
| 732 | <div class="content"> |
| 733 | <pre><tt> E---H'---I'---J' topicA</tt></pre> |
| 734 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 735 | <div class="paragraph"><p>This is useful if F and G were flawed in some way, or should not be |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 736 | part of topicA. Note that the argument to --onto and the <upstream> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 737 | parameter can be any valid commit-ish.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 738 | <div class="paragraph"><p>In case of conflict, <em>git rebase</em> will stop at the first problematic commit |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 739 | and leave conflict markers in the tree. You can use <em>git diff</em> to locate |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 740 | the markers (<<<<<<) and make edits to resolve the conflict. For each |
| 741 | file you edit, you need to tell git that the conflict has been resolved, |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 742 | typically this would be done with</p></div> |
Junio C Hamano | f02e09f | 2006-03-27 07:51:03 | [diff] [blame] | 743 | <div class="literalblock"> |
| 744 | <div class="content"> |
Junio C Hamano | 89d4e0f | 2007-02-18 00:34:59 | [diff] [blame] | 745 | <pre><tt>git add <filename></tt></pre> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 746 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 747 | <div class="paragraph"><p>After resolving the conflict manually and updating the index with the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 748 | desired resolution, you can continue the rebasing process with</p></div> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 749 | <div class="literalblock"> |
| 750 | <div class="content"> |
| 751 | <pre><tt>git rebase --continue</tt></pre> |
Junio C Hamano | f02e09f | 2006-03-27 07:51:03 | [diff] [blame] | 752 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 753 | <div class="paragraph"><p>Alternatively, you can undo the <em>git rebase</em> with</p></div> |
Junio C Hamano | f02e09f | 2006-03-27 07:51:03 | [diff] [blame] | 754 | <div class="literalblock"> |
| 755 | <div class="content"> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 756 | <pre><tt>git rebase --abort</tt></pre> |
Junio C Hamano | f02e09f | 2006-03-27 07:51:03 | [diff] [blame] | 757 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 758 | </div> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 759 | <h2 id="_configuration">CONFIGURATION</h2> |
| 760 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 761 | <div class="dlist"><dl> |
| 762 | <dt class="hdlist1"> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 763 | rebase.stat |
| 764 | </dt> |
| 765 | <dd> |
| 766 | <p> |
| 767 | Whether to show a diffstat of what changed upstream since the last |
| 768 | rebase. False by default. |
| 769 | </p> |
| 770 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 771 | <dt class="hdlist1"> |
Junio C Hamano | 075ae87 | 2010-09-01 18:43:07 | [diff] [blame] | 772 | rebase.autosquash |
| 773 | </dt> |
| 774 | <dd> |
| 775 | <p> |
| 776 | If set to true enable <em>--autosquash</em> option by default. |
| 777 | </p> |
| 778 | </dd> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 779 | </dl></div> |
| 780 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 781 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 782 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 783 | <div class="dlist"><dl> |
| 784 | <dt class="hdlist1"> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 785 | <newbase> |
| 786 | </dt> |
| 787 | <dd> |
| 788 | <p> |
| 789 | Starting point at which to create the new commits. If the |
| 790 | --onto option is not specified, the starting point is |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 791 | <upstream>. May be any valid commit, and not just an |
| 792 | existing branch name. |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 793 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 794 | <div class="paragraph"><p>As a special case, you may use "A...B" as a shortcut for the |
Junio C Hamano | e32ec8b | 2010-06-02 23:32:31 | [diff] [blame] | 795 | merge base of A and B if there is exactly one merge base. You can |
| 796 | leave out at most one of A and B, in which case it defaults to HEAD.</p></div> |
Junio C Hamano | 7e9f6b7 | 2006-02-22 10:44:55 | [diff] [blame] | 797 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 798 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 799 | <upstream> |
| 800 | </dt> |
| 801 | <dd> |
| 802 | <p> |
Junio C Hamano | 42f855f | 2007-02-06 00:09:38 | [diff] [blame] | 803 | Upstream branch to compare against. May be any valid commit, |
Junio C Hamano | b02377c | 2011-04-28 22:26:02 | [diff] [blame] | 804 | not just an existing branch name. Defaults to the configured |
| 805 | upstream for the current branch. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 806 | </p> |
| 807 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 808 | <dt class="hdlist1"> |
Junio C Hamano | 2b13527 | 2006-03-18 07:45:42 | [diff] [blame] | 809 | <branch> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 810 | </dt> |
| 811 | <dd> |
| 812 | <p> |
| 813 | Working branch; defaults to HEAD. |
| 814 | </p> |
| 815 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 816 | <dt class="hdlist1"> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 817 | --continue |
| 818 | </dt> |
| 819 | <dd> |
| 820 | <p> |
| 821 | Restart the rebasing process after having resolved a merge conflict. |
| 822 | </p> |
| 823 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 824 | <dt class="hdlist1"> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 825 | --abort |
| 826 | </dt> |
| 827 | <dd> |
| 828 | <p> |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 829 | Abort the rebase operation and reset HEAD to the original |
| 830 | branch. If <branch> was provided when the rebase operation was |
| 831 | started, then HEAD will be reset to <branch>. Otherwise HEAD |
| 832 | will be reset to where it was when the rebase operation was |
| 833 | started. |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 834 | </p> |
| 835 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 836 | <dt class="hdlist1"> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 837 | --skip |
| 838 | </dt> |
| 839 | <dd> |
| 840 | <p> |
| 841 | Restart the rebasing process by skipping the current patch. |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 842 | </p> |
| 843 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 844 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 845 | -m |
| 846 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 847 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 848 | --merge |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 849 | </dt> |
| 850 | <dd> |
| 851 | <p> |
| 852 | Use merging strategies to rebase. When the recursive (default) merge |
| 853 | strategy is used, this allows rebase to be aware of renames on the |
| 854 | upstream side. |
| 855 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 856 | <div class="paragraph"><p>Note that a rebase merge works by replaying each commit from the working |
Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 857 | branch on top of the <upstream> branch. Because of this, when a merge |
| 858 | conflict happens, the side reported as <em>ours</em> is the so-far rebased |
| 859 | series, starting with <upstream>, and <em>theirs</em> is the working branch. In |
| 860 | other words, the sides are swapped.</p></div> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 861 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 862 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 863 | -s <strategy> |
| 864 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 865 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 866 | --strategy=<strategy> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 867 | </dt> |
| 868 | <dd> |
| 869 | <p> |
Junio C Hamano | 52d5def | 2009-05-21 16:27:43 | [diff] [blame] | 870 | Use the given merge strategy. |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 871 | If there is no <tt>-s</tt> option <em>git merge-recursive</em> is used |
Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 872 | instead. This implies --merge. |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 873 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 874 | <div class="paragraph"><p>Because <em>git rebase</em> replays each commit from the working branch |
Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 875 | on top of the <upstream> branch using the given strategy, using |
| 876 | the <em>ours</em> strategy simply discards all patches from the <branch>, |
| 877 | which makes little sense.</p></div> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 878 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 879 | <dt class="hdlist1"> |
Junio C Hamano | 619596a | 2010-08-18 22:15:35 | [diff] [blame] | 880 | -X <strategy-option> |
| 881 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 882 | <dt class="hdlist1"> |
Junio C Hamano | 619596a | 2010-08-18 22:15:35 | [diff] [blame] | 883 | --strategy-option=<strategy-option> |
| 884 | </dt> |
| 885 | <dd> |
| 886 | <p> |
| 887 | Pass the <strategy-option> through to the merge strategy. |
| 888 | This implies <tt>--merge</tt> and, if no strategy has been |
| 889 | specified, <tt>-s recursive</tt>. Note the reversal of <em>ours</em> and |
| 890 | <em>theirs</em> as noted in above for the <tt>-m</tt> option. |
| 891 | </p> |
| 892 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 893 | <dt class="hdlist1"> |
Junio C Hamano | 2c14c8d | 2009-07-02 03:17:00 | [diff] [blame] | 894 | -q |
| 895 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 896 | <dt class="hdlist1"> |
Junio C Hamano | 2c14c8d | 2009-07-02 03:17:00 | [diff] [blame] | 897 | --quiet |
| 898 | </dt> |
| 899 | <dd> |
| 900 | <p> |
| 901 | Be quiet. Implies --no-stat. |
| 902 | </p> |
| 903 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 904 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 905 | -v |
| 906 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 907 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 908 | --verbose |
Junio C Hamano | fbe0052 | 2006-10-19 05:58:48 | [diff] [blame] | 909 | </dt> |
| 910 | <dd> |
| 911 | <p> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 912 | Be verbose. Implies --stat. |
| 913 | </p> |
| 914 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 915 | <dt class="hdlist1"> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 916 | --stat |
| 917 | </dt> |
| 918 | <dd> |
| 919 | <p> |
| 920 | Show a diffstat of what changed upstream since the last rebase. The |
| 921 | diffstat is also controlled by the configuration option rebase.stat. |
| 922 | </p> |
| 923 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 924 | <dt class="hdlist1"> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 925 | -n |
| 926 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 927 | <dt class="hdlist1"> |
Junio C Hamano | ea6a764 | 2009-03-11 23:56:19 | [diff] [blame] | 928 | --no-stat |
| 929 | </dt> |
| 930 | <dd> |
| 931 | <p> |
| 932 | Do not show a diffstat as part of the rebase process. |
Junio C Hamano | fbe0052 | 2006-10-19 05:58:48 | [diff] [blame] | 933 | </p> |
| 934 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 935 | <dt class="hdlist1"> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 936 | --no-verify |
| 937 | </dt> |
| 938 | <dd> |
| 939 | <p> |
| 940 | This option bypasses the pre-rebase hook. See also <a href="githooks.html">githooks(5)</a>. |
| 941 | </p> |
| 942 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 943 | <dt class="hdlist1"> |
Junio C Hamano | eef01fe | 2010-12-13 08:31:58 | [diff] [blame] | 944 | --verify |
| 945 | </dt> |
| 946 | <dd> |
| 947 | <p> |
| 948 | Allows the pre-rebase hook to run, which is the default. This option can |
| 949 | be used to override --no-verify. See also <a href="githooks.html">githooks(5)</a>. |
| 950 | </p> |
| 951 | </dd> |
| 952 | <dt class="hdlist1"> |
Junio C Hamano | d333998 | 2007-02-09 08:38:48 | [diff] [blame] | 953 | -C<n> |
| 954 | </dt> |
| 955 | <dd> |
| 956 | <p> |
| 957 | Ensure at least <n> lines of surrounding context match before |
| 958 | and after each change. When fewer lines of surrounding |
| 959 | context exist they all must match. By default no context is |
| 960 | ever ignored. |
| 961 | </p> |
| 962 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 963 | <dt class="hdlist1"> |
Junio C Hamano | a973f1c | 2009-03-19 17:47:52 | [diff] [blame] | 964 | -f |
| 965 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 966 | <dt class="hdlist1"> |
Junio C Hamano | a973f1c | 2009-03-19 17:47:52 | [diff] [blame] | 967 | --force-rebase |
| 968 | </dt> |
| 969 | <dd> |
| 970 | <p> |
| 971 | Force the rebase even if the current branch is a descendant |
Junio C Hamano | ef8fbf9 | 2010-04-04 19:12:02 | [diff] [blame] | 972 | of the commit you are rebasing onto. Normally non-interactive rebase will |
Junio C Hamano | a973f1c | 2009-03-19 17:47:52 | [diff] [blame] | 973 | exit with the message "Current branch is up to date" in such a |
| 974 | situation. |
Junio C Hamano | ef8fbf9 | 2010-04-04 19:12:02 | [diff] [blame] | 975 | Incompatible with the --interactive option. |
Junio C Hamano | a973f1c | 2009-03-19 17:47:52 | [diff] [blame] | 976 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 977 | <div class="paragraph"><p>You may find this (or --no-ff with an interactive rebase) helpful after |
Junio C Hamano | ef8fbf9 | 2010-04-04 19:12:02 | [diff] [blame] | 978 | reverting a topic branch merge, as this option recreates the topic branch with |
| 979 | fresh commits so it can be remerged successfully without needing to "revert |
| 980 | the reversion" (see the |
| 981 | <a href="howto/revert-a-faulty-merge.txt">revert-a-faulty-merge How-To</a> for details).</p></div> |
Junio C Hamano | a973f1c | 2009-03-19 17:47:52 | [diff] [blame] | 982 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 983 | <dt class="hdlist1"> |
Junio C Hamano | fe24db0 | 2009-08-22 05:10:47 | [diff] [blame] | 984 | --ignore-whitespace |
| 985 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 986 | <dt class="hdlist1"> |
Junio C Hamano | f8a7922 | 2009-03-01 08:02:50 | [diff] [blame] | 987 | --whitespace=<option> |
Junio C Hamano | 250f03e | 2007-09-10 01:33:28 | [diff] [blame] | 988 | </dt> |
| 989 | <dd> |
| 990 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 991 | These flag are passed to the <em>git apply</em> program |
Junio C Hamano | 250f03e | 2007-09-10 01:33:28 | [diff] [blame] | 992 | (see <a href="git-apply.html">git-apply(1)</a>) that applies the patch. |
Junio C Hamano | ec3b9a7 | 2009-02-13 08:45:52 | [diff] [blame] | 993 | Incompatible with the --interactive option. |
Junio C Hamano | 250f03e | 2007-09-10 01:33:28 | [diff] [blame] | 994 | </p> |
| 995 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 996 | <dt class="hdlist1"> |
Junio C Hamano | a973f1c | 2009-03-19 17:47:52 | [diff] [blame] | 997 | --committer-date-is-author-date |
| 998 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 999 | <dt class="hdlist1"> |
Junio C Hamano | a973f1c | 2009-03-19 17:47:52 | [diff] [blame] | 1000 | --ignore-date |
| 1001 | </dt> |
| 1002 | <dd> |
| 1003 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1004 | These flags are passed to <em>git am</em> to easily change the dates |
Junio C Hamano | a973f1c | 2009-03-19 17:47:52 | [diff] [blame] | 1005 | of the rebased commits (see <a href="git-am.html">git-am(1)</a>). |
Junio C Hamano | e97d577 | 2010-05-19 08:13:58 | [diff] [blame] | 1006 | Incompatible with the --interactive option. |
Junio C Hamano | a973f1c | 2009-03-19 17:47:52 | [diff] [blame] | 1007 | </p> |
| 1008 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1009 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1010 | -i |
| 1011 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1012 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1013 | --interactive |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1014 | </dt> |
| 1015 | <dd> |
| 1016 | <p> |
| 1017 | Make a list of the commits which are about to be rebased. Let the |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1018 | user edit that list before rebasing. This mode can also be used to |
| 1019 | split commits (see SPLITTING COMMITS below). |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1020 | </p> |
| 1021 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1022 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1023 | -p |
| 1024 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1025 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1026 | --preserve-merges |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1027 | </dt> |
| 1028 | <dd> |
| 1029 | <p> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1030 | Instead of ignoring merges, try to recreate them. |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1031 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1032 | <div class="paragraph"><p>This uses the <tt>--interactive</tt> machinery internally, but combining it |
Junio C Hamano | bb88cf4 | 2010-06-21 15:23:55 | [diff] [blame] | 1033 | with the <tt>--interactive</tt> option explicitly is generally not a good |
| 1034 | idea unless you know what you are doing (see BUGS below).</p></div> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1035 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1036 | <dt class="hdlist1"> |
Junio C Hamano | bd53dbf | 2009-01-18 18:26:37 | [diff] [blame] | 1037 | --root |
| 1038 | </dt> |
| 1039 | <dd> |
| 1040 | <p> |
| 1041 | Rebase all commits reachable from <branch>, instead of |
| 1042 | limiting them with an <upstream>. This allows you to rebase |
| 1043 | the root commit(s) on a branch. Must be used with --onto, and |
| 1044 | will skip changes already contained in <newbase> (instead of |
| 1045 | <upstream>). When used together with --preserve-merges, <em>all</em> |
| 1046 | root commits will be rewritten to have <newbase> as parent |
| 1047 | instead. |
| 1048 | </p> |
| 1049 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1050 | <dt class="hdlist1"> |
Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 1051 | --autosquash |
| 1052 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1053 | <dt class="hdlist1"> |
Junio C Hamano | 075ae87 | 2010-09-01 18:43:07 | [diff] [blame] | 1054 | --no-autosquash |
| 1055 | </dt> |
Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 1056 | <dd> |
| 1057 | <p> |
| 1058 | When the commit log message begins with "squash! …" (or |
| 1059 | "fixup! …"), and there is a commit whose title begins with |
| 1060 | the same …, automatically modify the todo list of rebase -i |
Junio C Hamano | 364b6a4 | 2010-01-22 07:57:59 | [diff] [blame] | 1061 | so that the commit marked for squashing comes right after the |
Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 1062 | commit to be modified, and change the action of the moved |
| 1063 | commit from <tt>pick</tt> to <tt>squash</tt> (or <tt>fixup</tt>). |
| 1064 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1065 | <div class="paragraph"><p>This option is only valid when the <em>--interactive</em> option is used.</p></div> |
| 1066 | <div class="paragraph"><p>If the <em>--autosquash</em> option is enabled by default using the |
Junio C Hamano | 075ae87 | 2010-09-01 18:43:07 | [diff] [blame] | 1067 | configuration variable <tt>rebase.autosquash</tt>, this option can be |
| 1068 | used to override and disable this setting.</p></div> |
Junio C Hamano | ef8fbf9 | 2010-04-04 19:12:02 | [diff] [blame] | 1069 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1070 | <dt class="hdlist1"> |
Junio C Hamano | ef8fbf9 | 2010-04-04 19:12:02 | [diff] [blame] | 1071 | --no-ff |
| 1072 | </dt> |
| 1073 | <dd> |
| 1074 | <p> |
| 1075 | With --interactive, cherry-pick all rebased commits instead of |
| 1076 | fast-forwarding over the unchanged ones. This ensures that the |
| 1077 | entire history of the rebased branch is composed of new commits. |
| 1078 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1079 | <div class="paragraph"><p>Without --interactive, this is a synonym for --force-rebase.</p></div> |
| 1080 | <div class="paragraph"><p>You may find this helpful after reverting a topic branch merge, as this option |
Junio C Hamano | ef8fbf9 | 2010-04-04 19:12:02 | [diff] [blame] | 1081 | recreates the topic branch with fresh commits so it can be remerged |
| 1082 | successfully without needing to "revert the reversion" (see the |
| 1083 | <a href="howto/revert-a-faulty-merge.txt">revert-a-faulty-merge How-To</a> for details).</p></div> |
Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 1084 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1085 | </dl></div> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1086 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1087 | <h2 id="_merge_strategies">MERGE STRATEGIES</h2> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1088 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1089 | <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] | 1090 | backend <em>merge strategies</em> to be chosen with <tt>-s</tt> option. Some strategies |
| 1091 | can also take their own options, which can be passed by giving <tt>-X<option></tt> |
| 1092 | 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] | 1093 | <div class="dlist"><dl> |
| 1094 | <dt class="hdlist1"> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1095 | resolve |
| 1096 | </dt> |
| 1097 | <dd> |
| 1098 | <p> |
| 1099 | This can only resolve two heads (i.e. the current branch |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 1100 | and another branch you pulled from) using a 3-way merge |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1101 | algorithm. It tries to carefully detect criss-cross |
| 1102 | merge ambiguities and is considered generally safe and |
| 1103 | fast. |
| 1104 | </p> |
| 1105 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1106 | <dt class="hdlist1"> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1107 | recursive |
| 1108 | </dt> |
| 1109 | <dd> |
| 1110 | <p> |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 1111 | This can only resolve two heads using a 3-way merge |
| 1112 | algorithm. When there is more than one common |
| 1113 | ancestor that can be used for 3-way merge, it creates a |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1114 | merged tree of the common ancestors and uses that as |
| 1115 | the reference tree for the 3-way merge. This has been |
| 1116 | reported to result in fewer merge conflicts without |
| 1117 | causing mis-merges by tests done on actual merge commits |
| 1118 | taken from Linux 2.6 kernel development history. |
| 1119 | Additionally this can detect and handle merges involving |
| 1120 | renames. This is the default merge strategy when |
| 1121 | pulling or merging one branch. |
| 1122 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1123 | <div class="paragraph"><p>The <em>recursive</em> strategy can take the following options:</p></div> |
| 1124 | <div class="dlist"><dl> |
| 1125 | <dt class="hdlist1"> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1126 | ours |
| 1127 | </dt> |
| 1128 | <dd> |
| 1129 | <p> |
| 1130 | This option forces conflicting hunks to be auto-resolved cleanly by |
| 1131 | favoring <em>our</em> version. Changes from the other tree that do not |
| 1132 | conflict with our side are reflected to the merge result. |
| 1133 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1134 | <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] | 1135 | even look at what the other tree contains at all. It discards everything |
| 1136 | the other tree did, declaring <em>our</em> history contains all that happened in it.</p></div> |
| 1137 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1138 | <dt class="hdlist1"> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1139 | theirs |
| 1140 | </dt> |
| 1141 | <dd> |
| 1142 | <p> |
| 1143 | This is opposite of <em>ours</em>. |
| 1144 | </p> |
| 1145 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1146 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1147 | patience |
| 1148 | </dt> |
| 1149 | <dd> |
| 1150 | <p> |
| 1151 | With this option, <em>merge-recursive</em> spends a little extra time |
| 1152 | to avoid mismerges that sometimes occur due to unimportant |
| 1153 | matching lines (e.g., braces from distinct functions). Use |
| 1154 | this when the branches to be merged have diverged wildly. |
| 1155 | See also <a href="git-diff.html">git-diff(1)</a> <tt>--patience</tt>. |
| 1156 | </p> |
| 1157 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1158 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1159 | ignore-space-change |
| 1160 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1161 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1162 | ignore-all-space |
| 1163 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1164 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1165 | ignore-space-at-eol |
| 1166 | </dt> |
| 1167 | <dd> |
| 1168 | <p> |
| 1169 | Treats lines with the indicated type of whitespace change as |
| 1170 | unchanged for the sake of a three-way merge. Whitespace |
| 1171 | changes mixed with other changes to a line are not ignored. |
| 1172 | See also <a href="git-diff.html">git-diff(1)</a> <tt>-b</tt>, <tt>-w</tt>, and |
| 1173 | <tt>--ignore-space-at-eol</tt>. |
| 1174 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1175 | <div class="ulist"><ul> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1176 | <li> |
| 1177 | <p> |
| 1178 | If <em>their</em> version only introduces whitespace changes to a line, |
| 1179 | <em>our</em> version is used; |
| 1180 | </p> |
| 1181 | </li> |
| 1182 | <li> |
| 1183 | <p> |
| 1184 | If <em>our</em> version introduces whitespace changes but <em>their</em> |
| 1185 | version includes a substantial change, <em>their</em> version is used; |
| 1186 | </p> |
| 1187 | </li> |
| 1188 | <li> |
| 1189 | <p> |
| 1190 | Otherwise, the merge proceeds in the usual way. |
| 1191 | </p> |
| 1192 | </li> |
| 1193 | </ul></div> |
| 1194 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1195 | <dt class="hdlist1"> |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 1196 | renormalize |
| 1197 | </dt> |
| 1198 | <dd> |
| 1199 | <p> |
| 1200 | This runs a virtual check-out and check-in of all three stages |
| 1201 | of a file when resolving a three-way merge. This option is |
| 1202 | meant to be used when merging branches with different clean |
| 1203 | filters or end-of-line normalization rules. See "Merging |
| 1204 | branches with differing checkin/checkout attributes" in |
| 1205 | <a href="gitattributes.html">gitattributes(5)</a> for details. |
| 1206 | </p> |
| 1207 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1208 | <dt class="hdlist1"> |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 1209 | no-renormalize |
| 1210 | </dt> |
| 1211 | <dd> |
| 1212 | <p> |
| 1213 | Disables the <tt>renormalize</tt> option. This overrides the |
| 1214 | <tt>merge.renormalize</tt> configuration variable. |
| 1215 | </p> |
| 1216 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1217 | <dt class="hdlist1"> |
Junio C Hamano | 39c7a69 | 2010-10-27 06:08:54 | [diff] [blame] | 1218 | rename-threshold=<n> |
| 1219 | </dt> |
| 1220 | <dd> |
| 1221 | <p> |
| 1222 | Controls the similarity threshold used for rename detection. |
| 1223 | See also <a href="git-diff.html">git-diff(1)</a> <tt>-M</tt>. |
| 1224 | </p> |
| 1225 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1226 | <dt class="hdlist1"> |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1227 | subtree[=<path>] |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1228 | </dt> |
| 1229 | <dd> |
| 1230 | <p> |
| 1231 | This option is a more advanced form of <em>subtree</em> strategy, where |
| 1232 | the strategy makes a guess on how two trees must be shifted to |
| 1233 | match with each other when merging. Instead, the specified path |
| 1234 | is prefixed (or stripped from the beginning) to make the shape of |
| 1235 | two trees to match. |
| 1236 | </p> |
| 1237 | </dd> |
| 1238 | </dl></div> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1239 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1240 | <dt class="hdlist1"> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1241 | octopus |
| 1242 | </dt> |
| 1243 | <dd> |
| 1244 | <p> |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 1245 | This resolves cases with more than two heads, but refuses to do |
| 1246 | a complex merge that needs manual resolution. It is |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1247 | primarily meant to be used for bundling topic branch |
| 1248 | heads together. This is the default merge strategy when |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 1249 | pulling or merging more than one branch. |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1250 | </p> |
| 1251 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1252 | <dt class="hdlist1"> |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1253 | ours |
| 1254 | </dt> |
| 1255 | <dd> |
| 1256 | <p> |
Junio C Hamano | bf984de | 2009-11-23 06:11:19 | [diff] [blame] | 1257 | This resolves any number of heads, but the resulting tree of the |
| 1258 | merge is always that of the current branch head, effectively |
| 1259 | ignoring all changes from all other branches. It is meant to |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1260 | be used to supersede old development history of side |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1261 | branches. Note that this is different from the -Xours option to |
| 1262 | the <em>recursive</em> merge strategy. |
Junio C Hamano | 97f518c | 2006-06-22 19:49:35 | [diff] [blame] | 1263 | </p> |
| 1264 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1265 | <dt class="hdlist1"> |
Junio C Hamano | e6c9203 | 2008-03-19 09:24:34 | [diff] [blame] | 1266 | subtree |
| 1267 | </dt> |
| 1268 | <dd> |
| 1269 | <p> |
| 1270 | This is a modified recursive strategy. When merging trees A and |
| 1271 | B, if B corresponds to a subtree of A, B is first adjusted to |
| 1272 | match the tree structure of A, instead of reading the trees at |
| 1273 | the same level. This adjustment is also done to the common |
| 1274 | ancestor tree. |
| 1275 | </p> |
| 1276 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1277 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1278 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1279 | <h2 id="_notes">NOTES</h2> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 1280 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1281 | <div class="paragraph"><p>You should understand the implications of using <em>git rebase</em> on a |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1282 | repository that you share. See also RECOVERING FROM UPSTREAM REBASE |
| 1283 | below.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1284 | <div class="paragraph"><p>When the git-rebase command is run, it will first execute a "pre-rebase" |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 1285 | hook if one exists. You can use this hook to do sanity checks and |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1286 | reject the rebase if it isn’t appropriate. Please see the template |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1287 | pre-rebase hook script for an example.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1288 | <div class="paragraph"><p>Upon completion, <branch> will be the current branch.</p></div> |
Junio C Hamano | 6112cad | 2006-05-02 07:28:06 | [diff] [blame] | 1289 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1290 | <h2 id="_interactive_mode">INTERACTIVE MODE</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1291 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1292 | <div class="paragraph"><p>Rebasing interactively means that you have a chance to edit the commits |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1293 | which are rebased. You can reorder the commits, and you can |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1294 | remove them (weeding out bad or otherwise unwanted patches).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1295 | <div class="paragraph"><p>The interactive mode is meant for this type of workflow:</p></div> |
| 1296 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1297 | <li> |
| 1298 | <p> |
| 1299 | have a wonderful idea |
| 1300 | </p> |
| 1301 | </li> |
| 1302 | <li> |
| 1303 | <p> |
| 1304 | hack on the code |
| 1305 | </p> |
| 1306 | </li> |
| 1307 | <li> |
| 1308 | <p> |
| 1309 | prepare a series for submission |
| 1310 | </p> |
| 1311 | </li> |
| 1312 | <li> |
| 1313 | <p> |
| 1314 | submit |
| 1315 | </p> |
| 1316 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1317 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1318 | <div class="paragraph"><p>where point 2. consists of several instances of</p></div> |
| 1319 | <div class="olist loweralpha"><ol class="loweralpha"> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1320 | <li> |
| 1321 | <p> |
| 1322 | regular use |
| 1323 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1324 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1325 | <li> |
| 1326 | <p> |
| 1327 | finish something worthy of a commit |
| 1328 | </p> |
| 1329 | </li> |
| 1330 | <li> |
| 1331 | <p> |
| 1332 | commit |
| 1333 | </p> |
| 1334 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1335 | </ol></div> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1336 | </li> |
| 1337 | <li> |
| 1338 | <p> |
| 1339 | independent fixup |
| 1340 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1341 | <div class="olist arabic"><ol class="arabic"> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1342 | <li> |
| 1343 | <p> |
| 1344 | realize that something does not work |
| 1345 | </p> |
| 1346 | </li> |
| 1347 | <li> |
| 1348 | <p> |
| 1349 | fix that |
| 1350 | </p> |
| 1351 | </li> |
| 1352 | <li> |
| 1353 | <p> |
| 1354 | commit it |
| 1355 | </p> |
| 1356 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1357 | </ol></div> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1358 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1359 | </ol></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1360 | <div class="paragraph"><p>Sometimes the thing fixed in b.2. cannot be amended to the not-quite |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1361 | perfect commit it fixes, because that commit is buried deeply in a |
| 1362 | patch series. That is exactly what interactive rebase is for: use it |
| 1363 | after plenty of "a"s and "b"s, by rearranging and editing |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1364 | commits, and squashing multiple commits into one.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1365 | <div class="paragraph"><p>Start it with the last commit you want to retain as-is:</p></div> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1366 | <div class="literalblock"> |
| 1367 | <div class="content"> |
| 1368 | <pre><tt>git rebase -i <after-this-commit></tt></pre> |
| 1369 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1370 | <div class="paragraph"><p>An editor will be fired up with all the commits in your current branch |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1371 | (ignoring merge commits), which come after the given commit. You can |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1372 | reorder the commits in this list to your heart’s content, and you can |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1373 | remove them. The list looks more or less like this:</p></div> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1374 | <div class="listingblock"> |
| 1375 | <div class="content"> |
| 1376 | <pre><tt>pick deadbee The oneline of this commit |
| 1377 | pick fa1afe1 The oneline of the next commit |
| 1378 | ...</tt></pre> |
| 1379 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1380 | <div class="paragraph"><p>The oneline descriptions are purely for your pleasure; <em>git rebase</em> will |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1381 | not look at them but at the commit names ("deadbee" and "fa1afe1" in this |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1382 | example), so do not delete or edit the names.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1383 | <div class="paragraph"><p>By replacing the command "pick" with the command "edit", you can tell |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1384 | <em>git rebase</em> to stop after applying that commit, so that you can edit |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1385 | the files and/or the commit message, amend the commit, and continue |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1386 | rebasing.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1387 | <div class="paragraph"><p>If you just want to edit the commit message for a commit, replace the |
Junio C Hamano | 3d23a0a | 2009-10-19 08:04:30 | [diff] [blame] | 1388 | command "pick" with the command "reword".</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1389 | <div class="paragraph"><p>If you want to fold two or more commits into one, replace the command |
Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 1390 | "pick" for the second and subsequent commits with "squash" or "fixup". |
| 1391 | If the commits had different authors, the folded commit will be |
| 1392 | attributed to the author of the first commit. The suggested commit |
| 1393 | message for the folded commit is the concatenation of the commit |
| 1394 | messages of the first commit and of those with the "squash" command, |
| 1395 | but omits the commit messages of commits with the "fixup" command.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1396 | <div class="paragraph"><p><em>git rebase</em> will stop when "pick" has been replaced with "edit" or |
Junio C Hamano | 3d23a0a | 2009-10-19 08:04:30 | [diff] [blame] | 1397 | when a command fails due to merge errors. When you are done editing |
| 1398 | and/or resolving conflicts you can continue with <tt>git rebase --continue</tt>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1399 | <div class="paragraph"><p>For example, if you want to reorder the last 5 commits, such that what |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1400 | was HEAD~4 becomes the new HEAD. To achieve that, you would call |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1401 | <em>git rebase</em> like this:</p></div> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1402 | <div class="listingblock"> |
| 1403 | <div class="content"> |
| 1404 | <pre><tt>$ git rebase -i HEAD~5</tt></pre> |
| 1405 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1406 | <div class="paragraph"><p>And move the first patch to the end of the list.</p></div> |
| 1407 | <div class="paragraph"><p>You might want to preserve merges, if you have a history like this:</p></div> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1408 | <div class="listingblock"> |
| 1409 | <div class="content"> |
| 1410 | <pre><tt> X |
| 1411 | \ |
| 1412 | A---M---B |
| 1413 | / |
| 1414 | ---o---O---P---Q</tt></pre> |
| 1415 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1416 | <div class="paragraph"><p>Suppose you want to rebase the side branch starting at "A" to "Q". Make |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1417 | sure that the current HEAD is "B", and call</p></div> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1418 | <div class="listingblock"> |
| 1419 | <div class="content"> |
| 1420 | <pre><tt>$ git rebase -i -p --onto Q O</tt></pre> |
| 1421 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1422 | <div class="paragraph"><p>Reordering and editing commits usually creates untested intermediate |
Junio C Hamano | 53ba6d0 | 2010-08-22 07:25:12 | [diff] [blame] | 1423 | steps. You may want to check that your history editing did not break |
| 1424 | anything by running a test, or at least recompiling at intermediate |
| 1425 | points in history by using the "exec" command (shortcut "x"). You may |
| 1426 | do so by creating a todo list like this one:</p></div> |
| 1427 | <div class="listingblock"> |
| 1428 | <div class="content"> |
| 1429 | <pre><tt>pick deadbee Implement feature XXX |
| 1430 | fixup f1a5c00 Fix to feature XXX |
| 1431 | exec make |
| 1432 | pick c0ffeee The oneline of the next commit |
| 1433 | edit deadbab The oneline of the commit after |
| 1434 | exec cd subdir; make test |
| 1435 | ...</tt></pre> |
| 1436 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1437 | <div class="paragraph"><p>The interactive rebase will stop when a command fails (i.e. exits with |
Junio C Hamano | 53ba6d0 | 2010-08-22 07:25:12 | [diff] [blame] | 1438 | non-0 status) to give you an opportunity to fix the problem. You can |
| 1439 | continue with <tt>git rebase --continue</tt>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1440 | <div class="paragraph"><p>The "exec" command launches the command in a shell (the one specified |
Junio C Hamano | 53ba6d0 | 2010-08-22 07:25:12 | [diff] [blame] | 1441 | in <tt>$SHELL</tt>, or the default shell if <tt>$SHELL</tt> is not set), so you can |
| 1442 | use shell features (like "cd", ">", ";" …). The command is run from |
| 1443 | the root of the working tree.</p></div> |
Junio C Hamano | 1d90cb0 | 2007-07-03 07:05:31 | [diff] [blame] | 1444 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1445 | <h2 id="_splitting_commits">SPLITTING COMMITS</h2> |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1446 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1447 | <div class="paragraph"><p>In interactive mode, you can mark commits with the action "edit". However, |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1448 | this does not necessarily mean that <em>git rebase</em> expects the result of this |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1449 | edit to be exactly one commit. Indeed, you can undo the commit, or you can |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1450 | add other commits. This can be used to split a commit into two:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1451 | <div class="ulist"><ul> |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1452 | <li> |
| 1453 | <p> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1454 | Start an interactive rebase with <tt>git rebase -i <commit>^</tt>, where |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1455 | <commit> is the commit you want to split. In fact, any commit range |
| 1456 | will do, as long as it contains that commit. |
| 1457 | </p> |
| 1458 | </li> |
| 1459 | <li> |
| 1460 | <p> |
| 1461 | Mark the commit you want to split with the action "edit". |
| 1462 | </p> |
| 1463 | </li> |
| 1464 | <li> |
| 1465 | <p> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1466 | When it comes to editing that commit, execute <tt>git reset HEAD^</tt>. The |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1467 | effect is that the HEAD is rewound by one, and the index follows suit. |
| 1468 | However, the working tree stays the same. |
| 1469 | </p> |
| 1470 | </li> |
| 1471 | <li> |
| 1472 | <p> |
| 1473 | Now add the changes to the index that you want to have in the first |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1474 | commit. You can use <tt>git add</tt> (possibly interactively) or |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1475 | <em>git gui</em> (or both) to do that. |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1476 | </p> |
| 1477 | </li> |
| 1478 | <li> |
| 1479 | <p> |
| 1480 | Commit the now-current index with whatever commit message is appropriate |
| 1481 | now. |
| 1482 | </p> |
| 1483 | </li> |
| 1484 | <li> |
| 1485 | <p> |
| 1486 | Repeat the last two steps until your working tree is clean. |
| 1487 | </p> |
| 1488 | </li> |
| 1489 | <li> |
| 1490 | <p> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1491 | Continue the rebase with <tt>git rebase --continue</tt>. |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1492 | </p> |
| 1493 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1494 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1495 | <div class="paragraph"><p>If you are not absolutely sure that the intermediate revisions are |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1496 | consistent (they compile, pass the testsuite, etc.) you should use |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1497 | <em>git stash</em> to stash away the not-yet-committed changes |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1498 | after each commit, test, and amend the commit if fixes are necessary.</p></div> |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1499 | </div> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1500 | <h2 id="_recovering_from_upstream_rebase">RECOVERING FROM UPSTREAM REBASE</h2> |
| 1501 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1502 | <div class="paragraph"><p>Rebasing (or any other form of rewriting) a branch that others have |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1503 | based work on is a bad idea: anyone downstream of it is forced to |
| 1504 | manually fix their history. This section explains how to do the fix |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1505 | from the downstream’s point of view. The real fix, however, would be |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1506 | to avoid rebasing the upstream in the first place.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1507 | <div class="paragraph"><p>To illustrate, suppose you are in a situation where someone develops a |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1508 | <em>subsystem</em> branch, and you are working on a <em>topic</em> that is dependent |
| 1509 | on this <em>subsystem</em>. You might end up with a history like the |
| 1510 | following:</p></div> |
| 1511 | <div class="listingblock"> |
| 1512 | <div class="content"> |
| 1513 | <pre><tt> o---o---o---o---o---o---o---o---o master |
| 1514 | \ |
| 1515 | o---o---o---o---o subsystem |
| 1516 | \ |
| 1517 | *---*---* topic</tt></pre> |
| 1518 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1519 | <div class="paragraph"><p>If <em>subsystem</em> is rebased against <em>master</em>, the following happens:</p></div> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1520 | <div class="listingblock"> |
| 1521 | <div class="content"> |
| 1522 | <pre><tt> o---o---o---o---o---o---o---o master |
| 1523 | \ \ |
| 1524 | o---o---o---o---o o'--o'--o'--o'--o' subsystem |
| 1525 | \ |
| 1526 | *---*---* topic</tt></pre> |
| 1527 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1528 | <div class="paragraph"><p>If you now continue development as usual, and eventually merge <em>topic</em> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1529 | to <em>subsystem</em>, the commits from <em>subsystem</em> will remain duplicated forever:</p></div> |
| 1530 | <div class="listingblock"> |
| 1531 | <div class="content"> |
| 1532 | <pre><tt> o---o---o---o---o---o---o---o master |
| 1533 | \ \ |
| 1534 | o---o---o---o---o o'--o'--o'--o'--o'--M subsystem |
| 1535 | \ / |
| 1536 | *---*---*-..........-*--* topic</tt></pre> |
| 1537 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1538 | <div class="paragraph"><p>Such duplicates are generally frowned upon because they clutter up |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1539 | history, making it harder to follow. To clean things up, you need to |
| 1540 | transplant the commits on <em>topic</em> to the new <em>subsystem</em> tip, i.e., |
| 1541 | rebase <em>topic</em>. This becomes a ripple effect: anyone downstream from |
| 1542 | <em>topic</em> is forced to rebase too, and so on!</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1543 | <div class="paragraph"><p>There are two kinds of fixes, discussed in the following subsections:</p></div> |
| 1544 | <div class="dlist"><dl> |
| 1545 | <dt class="hdlist1"> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1546 | Easy case: The changes are literally the same. |
| 1547 | </dt> |
| 1548 | <dd> |
| 1549 | <p> |
| 1550 | This happens if the <em>subsystem</em> rebase was a simple rebase and |
| 1551 | had no conflicts. |
| 1552 | </p> |
| 1553 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1554 | <dt class="hdlist1"> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1555 | Hard case: The changes are not the same. |
| 1556 | </dt> |
| 1557 | <dd> |
| 1558 | <p> |
| 1559 | This happens if the <em>subsystem</em> rebase had conflicts, or used |
Junio C Hamano | a9701f0 | 2010-01-21 00:42:16 | [diff] [blame] | 1560 | <tt>--interactive</tt> to omit, edit, squash, or fixup commits; or |
| 1561 | if the upstream used one of <tt>commit --amend</tt>, <tt>reset</tt>, or |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1562 | <tt>filter-branch</tt>. |
| 1563 | </p> |
| 1564 | </dd> |
| 1565 | </dl></div> |
| 1566 | <h3 id="_the_easy_case">The easy case</h3><div style="clear:left"></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1567 | <div class="paragraph"><p>Only works if the changes (patch IDs based on the diff contents) on |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1568 | <em>subsystem</em> are literally the same before and after the rebase |
| 1569 | <em>subsystem</em> did.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1570 | <div class="paragraph"><p>In that case, the fix is easy because <em>git rebase</em> knows to skip |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1571 | changes that are already present in the new upstream. So if you say |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1572 | (assuming you’re on <em>topic</em>)</p></div> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1573 | <div class="listingblock"> |
| 1574 | <div class="content"> |
| 1575 | <pre><tt> $ git rebase subsystem</tt></pre> |
| 1576 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1577 | <div class="paragraph"><p>you will end up with the fixed history</p></div> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1578 | <div class="listingblock"> |
| 1579 | <div class="content"> |
| 1580 | <pre><tt> o---o---o---o---o---o---o---o master |
| 1581 | \ |
| 1582 | o'--o'--o'--o'--o' subsystem |
| 1583 | \ |
| 1584 | *---*---* topic</tt></pre> |
| 1585 | </div></div> |
| 1586 | <h3 id="_the_hard_case">The hard case</h3><div style="clear:left"></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1587 | <div class="paragraph"><p>Things get more complicated if the <em>subsystem</em> changes do not exactly |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1588 | correspond to the ones before the rebase.</p></div> |
| 1589 | <div class="admonitionblock"> |
| 1590 | <table><tr> |
| 1591 | <td class="icon"> |
| 1592 | <div class="title">Note</div> |
| 1593 | </td> |
| 1594 | <td class="content">While an "easy case recovery" sometimes appears to be successful |
| 1595 | even in the hard case, it may have unintended consequences. For |
| 1596 | example, a commit that was removed via <tt>git rebase |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1597 | --interactive</tt> will be <strong>resurrected</strong>!</td> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1598 | </tr></table> |
| 1599 | </div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1600 | <div class="paragraph"><p>The idea is to manually tell <em>git rebase</em> "where the old <em>subsystem</em> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1601 | ended and your <em>topic</em> began", that is, what the old merge-base |
| 1602 | between them was. You will have to find a way to name the last commit |
| 1603 | of the old <em>subsystem</em>, for example:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1604 | <div class="ulist"><ul> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1605 | <li> |
| 1606 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1607 | With the <em>subsystem</em> reflog: after <em>git fetch</em>, the old tip of |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1608 | <em>subsystem</em> is at <tt>subsystem@{1}</tt>. Subsequent fetches will |
| 1609 | increase the number. (See <a href="git-reflog.html">git-reflog(1)</a>.) |
| 1610 | </p> |
| 1611 | </li> |
| 1612 | <li> |
| 1613 | <p> |
| 1614 | Relative to the tip of <em>topic</em>: knowing that your <em>topic</em> has three |
| 1615 | commits, the old tip of <em>subsystem</em> must be <tt>topic~3</tt>. |
| 1616 | </p> |
| 1617 | </li> |
| 1618 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1619 | <div class="paragraph"><p>You can then transplant the old <tt>subsystem..topic</tt> to the new tip by |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1620 | saying (for the reflog case, and assuming you are on <em>topic</em> already):</p></div> |
| 1621 | <div class="listingblock"> |
| 1622 | <div class="content"> |
| 1623 | <pre><tt> $ git rebase --onto subsystem subsystem@{1}</tt></pre> |
| 1624 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1625 | <div class="paragraph"><p>The ripple effect of a "hard case" recovery is especially bad: |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 1626 | <em>everyone</em> downstream from <em>topic</em> will now have to perform a "hard |
| 1627 | case" recovery too!</p></div> |
| 1628 | </div> |
Junio C Hamano | bb88cf4 | 2010-06-21 15:23:55 | [diff] [blame] | 1629 | <h2 id="_bugs">BUGS</h2> |
| 1630 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1631 | <div class="paragraph"><p>The todo list presented by <tt>--preserve-merges --interactive</tt> does not |
Junio C Hamano | bb88cf4 | 2010-06-21 15:23:55 | [diff] [blame] | 1632 | represent the topology of the revision graph. Editing commits and |
| 1633 | rewording their commit messages should work fine, but attempts to |
| 1634 | reorder commits tend to produce counterintuitive results.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1635 | <div class="paragraph"><p>For example, an attempt to rearrange</p></div> |
Junio C Hamano | bb88cf4 | 2010-06-21 15:23:55 | [diff] [blame] | 1636 | <div class="listingblock"> |
| 1637 | <div class="content"> |
| 1638 | <pre><tt>1 --- 2 --- 3 --- 4 --- 5</tt></pre> |
| 1639 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1640 | <div class="paragraph"><p>to</p></div> |
Junio C Hamano | bb88cf4 | 2010-06-21 15:23:55 | [diff] [blame] | 1641 | <div class="listingblock"> |
| 1642 | <div class="content"> |
| 1643 | <pre><tt>1 --- 2 --- 4 --- 3 --- 5</tt></pre> |
| 1644 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1645 | <div class="paragraph"><p>by moving the "pick 4" line will result in the following history:</p></div> |
Junio C Hamano | bb88cf4 | 2010-06-21 15:23:55 | [diff] [blame] | 1646 | <div class="listingblock"> |
| 1647 | <div class="content"> |
| 1648 | <pre><tt> 3 |
| 1649 | / |
| 1650 | 1 --- 2 --- 4 --- 5</tt></pre> |
| 1651 | </div></div> |
| 1652 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1653 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1654 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1655 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1656 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1657 | </div> |
| 1658 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1659 | <div id="footer"> |
| 1660 | <div id="footer-text"> |
Junio C Hamano | 02194af | 2011-11-17 20:33:59 | [diff] [blame] | 1661 | Last updated 2011-11-15 13:45:02 PDT |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1662 | </div> |
| 1663 | </div> |
| 1664 | </body> |
| 1665 | </html> |