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-reset(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-reset(1) Manual Page |
| 574 | </h1> |
| 575 | <h2>NAME</h2> |
| 576 | <div class="sectionbody"> |
| 577 | <p>git-reset - |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 578 | Reset current HEAD to the specified state |
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 | d793de5 | 2006-12-26 09:11:43 | [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 reset</em> [-q] [<commit>] [--] <paths>… |
Junio C Hamano | f0944d0 | 2011-11-30 20:46:29 | [diff] [blame] | 587 | <em>git reset</em> (--patch | -p) [<commit>] [--] [<paths>…] |
| 588 | <em>git reset</em> (--soft | --mixed | --hard | --merge | --keep) [-q] [<commit>]</div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 589 | <div class="verseblock-attribution"> |
| 590 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 591 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 592 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 593 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 594 | <div class="paragraph"><p>In the first and second form, copy entries from <commit> to the index. |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 595 | In the third form, set the current branch head (HEAD) to <commit>, optionally |
| 596 | modifying index and working tree to match. The <commit> defaults to HEAD |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 597 | in all forms.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 598 | <div class="dlist"><dl> |
| 599 | <dt class="hdlist1"> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 600 | <em>git reset</em> [-q] [<commit>] [--] <paths>… |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 601 | </dt> |
| 602 | <dd> |
| 603 | <p> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 604 | This form resets the index entries for all <paths> to their |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 605 | state at <commit>. (It does not affect the working tree, nor |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 606 | the current branch.) |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 607 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 608 | <div class="paragraph"><p>This means that <tt>git reset <paths></tt> is the opposite of <tt>git add |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 609 | <paths></tt>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 610 | <div class="paragraph"><p>After running <tt>git reset <paths></tt> to update the index entry, you can |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 611 | use <a href="git-checkout.html">git-checkout(1)</a> to check the contents out of the index to |
| 612 | the working tree. |
| 613 | Alternatively, using <a href="git-checkout.html">git-checkout(1)</a> and specifying a commit, you |
| 614 | can copy the contents of a path out of a commit to the index and to the |
| 615 | working tree in one go.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 616 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 617 | <dt class="hdlist1"> |
Junio C Hamano | f0944d0 | 2011-11-30 20:46:29 | [diff] [blame] | 618 | <em>git reset</em> (--patch | -p) [<commit>] [--] [<paths>…] |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 619 | </dt> |
| 620 | <dd> |
| 621 | <p> |
| 622 | Interactively select hunks in the difference between the index |
| 623 | and <commit> (defaults to HEAD). The chosen hunks are applied |
| 624 | in reverse to the index. |
| 625 | </p> |
Junio C Hamano | 9eb5835 | 2011-05-11 20:09:24 | [diff] [blame] | 626 | <div class="paragraph"><p>This means that <tt>git reset -p</tt> is the opposite of <tt>git add -p</tt>, i.e. |
| 627 | you can use it to selectively reset hunks. See the “Interactive Mode” |
| 628 | section of <a href="git-add.html">git-add(1)</a> to learn how to operate the <tt>--patch</tt> mode.</p></div> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 629 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 630 | <dt class="hdlist1"> |
Junio C Hamano | f0944d0 | 2011-11-30 20:46:29 | [diff] [blame] | 631 | <em>git reset</em> --<mode> [<commit>] |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 632 | </dt> |
| 633 | <dd> |
| 634 | <p> |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 635 | This form resets the current branch head to <commit> and |
| 636 | possibly updates the index (resetting it to the tree of <commit>) and |
| 637 | the working tree depending on <mode>, which |
| 638 | must be one of the following: |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 639 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 640 | <div class="dlist"><dl> |
| 641 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 642 | --soft |
| 643 | </dt> |
| 644 | <dd> |
| 645 | <p> |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 646 | Does not touch the index file nor the working tree at all (but |
| 647 | resets the head to <commit>, just like all modes do). This leaves |
| 648 | all your changed files "Changes to be committed", as <em>git status</em> |
| 649 | would put it. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 650 | </p> |
| 651 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 652 | <dt class="hdlist1"> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 653 | --mixed |
| 654 | </dt> |
| 655 | <dd> |
| 656 | <p> |
| 657 | Resets the index but not the working tree (i.e., the changed files |
| 658 | are preserved but not marked for commit) and reports what has not |
| 659 | been updated. This is the default action. |
| 660 | </p> |
| 661 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 662 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 663 | --hard |
| 664 | </dt> |
| 665 | <dd> |
| 666 | <p> |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 667 | Resets the index and working tree. Any changes to tracked files in the |
| 668 | working tree since <commit> are discarded. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 669 | </p> |
| 670 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 671 | <dt class="hdlist1"> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 672 | --merge |
| 673 | </dt> |
| 674 | <dd> |
| 675 | <p> |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 676 | Resets the index and updates the files in the working tree that are |
| 677 | different between <commit> and HEAD, but keeps those which are |
| 678 | different between the index and working tree (i.e. which have changes |
| 679 | which have not been added). |
| 680 | If a file that is different between <commit> and the index has unstaged |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 681 | changes, reset is aborted. |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 682 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 683 | <div class="paragraph"><p>In other words, --merge does something like a <em>git read-tree -u -m <commit></em>, |
| 684 | but carries forward unmerged index entries.</p></div> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 685 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 686 | <dt class="hdlist1"> |
Junio C Hamano | 0299d92 | 2010-03-20 20:59:31 | [diff] [blame] | 687 | --keep |
| 688 | </dt> |
| 689 | <dd> |
| 690 | <p> |
Junio C Hamano | 20338b4 | 2011-01-22 00:51:59 | [diff] [blame] | 691 | Resets index entries and updates files in the working tree that are |
| 692 | different between <commit> and HEAD. |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 693 | If a file that is different between <commit> and HEAD has local changes, |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 694 | reset is aborted. |
Junio C Hamano | 0299d92 | 2010-03-20 20:59:31 | [diff] [blame] | 695 | </p> |
| 696 | </dd> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 697 | </dl></div> |
Junio C Hamano | c28068f | 2009-09-08 00:55:23 | [diff] [blame] | 698 | </dd> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 699 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 700 | <div class="paragraph"><p>If you want to undo a commit other than the latest on a branch, |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 701 | <a href="git-revert.html">git-revert(1)</a> is your friend.</p></div> |
| 702 | </div> |
| 703 | <h2 id="_options">OPTIONS</h2> |
| 704 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 705 | <div class="dlist"><dl> |
| 706 | <dt class="hdlist1"> |
Junio C Hamano | 422cfec | 2007-11-08 08:07:45 | [diff] [blame] | 707 | -q |
| 708 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 709 | <dt class="hdlist1"> |
Junio C Hamano | b141a92 | 2010-01-10 19:55:14 | [diff] [blame] | 710 | --quiet |
| 711 | </dt> |
Junio C Hamano | 422cfec | 2007-11-08 08:07:45 | [diff] [blame] | 712 | <dd> |
| 713 | <p> |
| 714 | Be quiet, only report errors. |
| 715 | </p> |
| 716 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 717 | </dl></div> |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 718 | </div> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 719 | <h2 id="_examples">EXAMPLES</h2> |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 720 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 721 | <div class="dlist"><dl> |
| 722 | <dt class="hdlist1"> |
Junio C Hamano | 89d4e0f | 2007-02-18 00:34:59 | [diff] [blame] | 723 | Undo add |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 724 | </dt> |
| 725 | <dd> |
| 726 | <div class="listingblock"> |
| 727 | <div class="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 728 | <pre><tt>$ edit <b><1></b> |
Junio C Hamano | 89d4e0f | 2007-02-18 00:34:59 | [diff] [blame] | 729 | $ git add frotz.c filfre.c |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 730 | $ mailx <b><2></b> |
| 731 | $ git reset <b><3></b> |
| 732 | $ git pull git://info.example.com/ nitfol <b><4></b></tt></pre> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 733 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 734 | <div class="colist arabic"><ol> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 735 | <li> |
| 736 | <p> |
Junio C Hamano | 092f5f0 | 2007-08-02 07:23:38 | [diff] [blame] | 737 | You are happily working on something, and find the changes |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 738 | in these files are in good order. You do not want to see them |
| 739 | when you run "git diff", because you plan to work on other files |
| 740 | and changes with these files are distracting. |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 741 | </p> |
| 742 | </li> |
| 743 | <li> |
| 744 | <p> |
Junio C Hamano | 092f5f0 | 2007-08-02 07:23:38 | [diff] [blame] | 745 | Somebody asks you to pull, and the changes sounds worthy of merging. |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 746 | </p> |
| 747 | </li> |
| 748 | <li> |
| 749 | <p> |
Junio C Hamano | 092f5f0 | 2007-08-02 07:23:38 | [diff] [blame] | 750 | However, you already dirtied the index (i.e. your index does |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 751 | not match the HEAD commit). But you know the pull you are going |
| 752 | to make does not affect frotz.c nor filfre.c, so you revert the |
| 753 | index changes for these two files. Your changes in working tree |
| 754 | remain there. |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 755 | </p> |
| 756 | </li> |
| 757 | <li> |
| 758 | <p> |
Junio C Hamano | 092f5f0 | 2007-08-02 07:23:38 | [diff] [blame] | 759 | Then you can pull and merge, leaving frotz.c and filfre.c |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 760 | changes still in the working tree. |
| 761 | </p> |
| 762 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 763 | </ol></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 764 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 765 | <dt class="hdlist1"> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 766 | Undo a commit and redo |
| 767 | </dt> |
| 768 | <dd> |
| 769 | <div class="listingblock"> |
| 770 | <div class="content"> |
| 771 | <pre><tt>$ git commit ... |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 772 | $ git reset --soft HEAD^ <b><1></b> |
| 773 | $ edit <b><2></b> |
| 774 | $ git commit -a -c ORIG_HEAD <b><3></b></tt></pre> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 775 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 776 | <div class="colist arabic"><ol> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 777 | <li> |
| 778 | <p> |
| 779 | This is most often done when you remembered what you |
| 780 | just committed is incomplete, or you misspelled your commit |
| 781 | message, or both. Leaves working tree as it was before "reset". |
| 782 | </p> |
| 783 | </li> |
| 784 | <li> |
| 785 | <p> |
| 786 | Make corrections to working tree files. |
| 787 | </p> |
| 788 | </li> |
| 789 | <li> |
| 790 | <p> |
| 791 | "reset" copies the old head to .git/ORIG_HEAD; redo the |
| 792 | commit by starting with its log message. If you do not need to |
| 793 | edit the message further, you can give -C option instead. |
| 794 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 795 | <div class="paragraph"><p>See also the --amend option to <a href="git-commit.html">git-commit(1)</a>.</p></div> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 796 | </li> |
| 797 | </ol></div> |
| 798 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 799 | <dt class="hdlist1"> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 800 | Undo a commit, making it a topic branch |
| 801 | </dt> |
| 802 | <dd> |
| 803 | <div class="listingblock"> |
| 804 | <div class="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 805 | <pre><tt>$ git branch topic/wip <b><1></b> |
| 806 | $ git reset --hard HEAD~3 <b><2></b> |
| 807 | $ git checkout topic/wip <b><3></b></tt></pre> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 808 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 809 | <div class="colist arabic"><ol> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 810 | <li> |
| 811 | <p> |
| 812 | You have made some commits, but realize they were premature |
| 813 | to be in the "master" branch. You want to continue polishing |
| 814 | them in a topic branch, so create "topic/wip" branch off of the |
| 815 | current HEAD. |
| 816 | </p> |
| 817 | </li> |
| 818 | <li> |
| 819 | <p> |
| 820 | Rewind the master branch to get rid of those three commits. |
| 821 | </p> |
| 822 | </li> |
| 823 | <li> |
| 824 | <p> |
| 825 | Switch to "topic/wip" branch and keep working. |
| 826 | </p> |
| 827 | </li> |
| 828 | </ol></div> |
| 829 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 830 | <dt class="hdlist1"> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 831 | Undo commits permanently |
| 832 | </dt> |
| 833 | <dd> |
| 834 | <div class="listingblock"> |
| 835 | <div class="content"> |
| 836 | <pre><tt>$ git commit ... |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 837 | $ git reset --hard HEAD~3 <b><1></b></tt></pre> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 838 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 839 | <div class="colist arabic"><ol> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 840 | <li> |
| 841 | <p> |
| 842 | The last three commits (HEAD, HEAD^, and HEAD~2) were bad |
| 843 | and you do not want to ever see them again. Do <strong>not</strong> do this if |
| 844 | you have already given these commits to somebody else. (See the |
| 845 | "RECOVERING FROM UPSTREAM REBASE" section in <a href="git-rebase.html">git-rebase(1)</a> for |
| 846 | the implications of doing so.) |
| 847 | </p> |
| 848 | </li> |
| 849 | </ol></div> |
| 850 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 851 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 852 | Undo a merge or pull |
| 853 | </dt> |
| 854 | <dd> |
| 855 | <div class="listingblock"> |
| 856 | <div class="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 857 | <pre><tt>$ git pull <b><1></b> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 858 | Auto-merging nitfol |
| 859 | CONFLICT (content): Merge conflict in nitfol |
Junio C Hamano | 6a3c827 | 2008-12-19 21:38:18 | [diff] [blame] | 860 | Automatic merge failed; fix conflicts and then commit the result. |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 861 | $ git reset --hard <b><2></b> |
| 862 | $ git pull . topic/branch <b><3></b> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 863 | Updating from 41223... to 13134... |
Junio C Hamano | 3f680f3 | 2009-11-16 02:10:54 | [diff] [blame] | 864 | Fast-forward |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 865 | $ git reset --hard ORIG_HEAD <b><4></b></tt></pre> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 866 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 867 | <div class="colist arabic"><ol> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 868 | <li> |
| 869 | <p> |
Junio C Hamano | 092f5f0 | 2007-08-02 07:23:38 | [diff] [blame] | 870 | Try to update from the upstream resulted in a lot of |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 871 | conflicts; you were not ready to spend a lot of time merging |
| 872 | right now, so you decide to do that later. |
| 873 | </p> |
| 874 | </li> |
| 875 | <li> |
| 876 | <p> |
| 877 | "pull" has not made merge commit, so "git reset --hard" |
| 878 | which is a synonym for "git reset --hard HEAD" clears the mess |
| 879 | from the index file and the working tree. |
| 880 | </p> |
| 881 | </li> |
| 882 | <li> |
| 883 | <p> |
Junio C Hamano | 092f5f0 | 2007-08-02 07:23:38 | [diff] [blame] | 884 | Merge a topic branch into the current branch, which resulted |
Junio C Hamano | 3f680f3 | 2009-11-16 02:10:54 | [diff] [blame] | 885 | in a fast-forward. |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 886 | </p> |
| 887 | </li> |
| 888 | <li> |
| 889 | <p> |
Junio C Hamano | 092f5f0 | 2007-08-02 07:23:38 | [diff] [blame] | 890 | But you decided that the topic branch is not ready for public |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 891 | consumption yet. "pull" or "merge" always leaves the original |
| 892 | tip of the current branch in ORIG_HEAD, so resetting hard to it |
| 893 | brings your index file and the working tree back to that state, |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 894 | and resets the tip of the branch to that commit. |
| 895 | </p> |
| 896 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 897 | </ol></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 898 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 899 | <dt class="hdlist1"> |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 900 | Undo a merge or pull inside a dirty working tree |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 901 | </dt> |
| 902 | <dd> |
| 903 | <div class="listingblock"> |
| 904 | <div class="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 905 | <pre><tt>$ git pull <b><1></b> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 906 | Auto-merging nitfol |
| 907 | Merge made by recursive. |
| 908 | nitfol | 20 +++++---- |
| 909 | ... |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 910 | $ git reset --merge ORIG_HEAD <b><2></b></tt></pre> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 911 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 912 | <div class="colist arabic"><ol> |
Junio C Hamano | bbbb865 | 2008-12-29 10:34:22 | [diff] [blame] | 913 | <li> |
| 914 | <p> |
| 915 | Even if you may have local modifications in your |
| 916 | working tree, you can safely say "git pull" when you know |
| 917 | that the change in the other branch does not overlap with |
| 918 | them. |
| 919 | </p> |
| 920 | </li> |
| 921 | <li> |
| 922 | <p> |
| 923 | After inspecting the result of the merge, you may find |
| 924 | that the change in the other branch is unsatisfactory. Running |
| 925 | "git reset --hard ORIG_HEAD" will let you go back to where you |
| 926 | were, but it will discard your local changes, which you do not |
| 927 | want. "git reset --merge" keeps your local changes. |
| 928 | </p> |
| 929 | </li> |
| 930 | </ol></div> |
| 931 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 932 | <dt class="hdlist1"> |
Junio C Hamano | 74e8a2d | 2006-01-14 03:58:41 | [diff] [blame] | 933 | Interrupted workflow |
| 934 | </dt> |
| 935 | <dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 936 | <div class="paragraph"><p>Suppose you are interrupted by an urgent fix request while you |
Junio C Hamano | a6331a8 | 2006-01-22 07:50:33 | [diff] [blame] | 937 | are in the middle of a large change. The files in your |
Junio C Hamano | 74e8a2d | 2006-01-14 03:58:41 | [diff] [blame] | 938 | working tree are not in any shape to be committed yet, but you |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 939 | need to get to the other branch for a quick bugfix.</p></div> |
Junio C Hamano | 74e8a2d | 2006-01-14 03:58:41 | [diff] [blame] | 940 | <div class="listingblock"> |
| 941 | <div class="content"> |
| 942 | <pre><tt>$ git checkout feature ;# you were working in "feature" branch and |
| 943 | $ work work work ;# got interrupted |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 944 | $ git commit -a -m "snapshot WIP" <b><1></b> |
Junio C Hamano | 74e8a2d | 2006-01-14 03:58:41 | [diff] [blame] | 945 | $ git checkout master |
| 946 | $ fix fix fix |
| 947 | $ git commit ;# commit with real log |
| 948 | $ git checkout feature |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 949 | $ git reset --soft HEAD^ ;# go back to WIP state <b><2></b> |
| 950 | $ git reset <b><3></b></tt></pre> |
Junio C Hamano | 74e8a2d | 2006-01-14 03:58:41 | [diff] [blame] | 951 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 952 | <div class="colist arabic"><ol> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 953 | <li> |
| 954 | <p> |
| 955 | This commit will get blown away so a throw-away log message is OK. |
| 956 | </p> |
| 957 | </li> |
| 958 | <li> |
| 959 | <p> |
| 960 | This removes the <em>WIP</em> commit from the commit history, and sets |
| 961 | your working tree to the state just before you made that snapshot. |
| 962 | </p> |
| 963 | </li> |
| 964 | <li> |
| 965 | <p> |
| 966 | At this point the index file still has all the WIP changes you |
| 967 | committed as <em>snapshot WIP</em>. This updates the index to show your |
| 968 | WIP files as uncommitted. |
| 969 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 970 | <div class="paragraph"><p>See also <a href="git-stash.html">git-stash(1)</a>.</p></div> |
Junio C Hamano | c8d88c2 | 2006-04-29 07:02:01 | [diff] [blame] | 971 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 972 | </ol></div> |
Junio C Hamano | 74e8a2d | 2006-01-14 03:58:41 | [diff] [blame] | 973 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 974 | <dt class="hdlist1"> |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 975 | Reset a single file in the index |
| 976 | </dt> |
| 977 | <dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 978 | <div class="paragraph"><p>Suppose you have added a file to your index, but later decide you do not |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 979 | want to add it to your commit. You can remove the file from the index |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 980 | while keeping your changes with git reset.</p></div> |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 981 | <div class="listingblock"> |
| 982 | <div class="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 983 | <pre><tt>$ git reset -- frotz.c <b><1></b> |
| 984 | $ git commit -m "Commit files in index" <b><2></b> |
| 985 | $ git add frotz.c <b><3></b></tt></pre> |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 986 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 987 | <div class="colist arabic"><ol> |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 988 | <li> |
| 989 | <p> |
| 990 | This removes the file from the index while keeping it in the working |
| 991 | directory. |
| 992 | </p> |
| 993 | </li> |
| 994 | <li> |
| 995 | <p> |
| 996 | This commits all other changes in the index. |
| 997 | </p> |
| 998 | </li> |
| 999 | <li> |
| 1000 | <p> |
| 1001 | Adds the file to the index again. |
| 1002 | </p> |
| 1003 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1004 | </ol></div> |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 1005 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1006 | <dt class="hdlist1"> |
Junio C Hamano | 0299d92 | 2010-03-20 20:59:31 | [diff] [blame] | 1007 | Keep changes in working tree while discarding some previous commits |
| 1008 | </dt> |
| 1009 | <dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1010 | <div class="paragraph"><p>Suppose you are working on something and you commit it, and then you |
Junio C Hamano | 0299d92 | 2010-03-20 20:59:31 | [diff] [blame] | 1011 | continue working a bit more, but now you think that what you have in |
| 1012 | your working tree should be in another branch that has nothing to do |
Junio C Hamano | 619596a | 2010-08-18 22:15:35 | [diff] [blame] | 1013 | with what you committed previously. You can start a new branch and |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 1014 | reset it while keeping the changes in your working tree.</p></div> |
Junio C Hamano | 0299d92 | 2010-03-20 20:59:31 | [diff] [blame] | 1015 | <div class="listingblock"> |
| 1016 | <div class="content"> |
| 1017 | <pre><tt>$ git tag start |
| 1018 | $ git checkout -b branch1 |
| 1019 | $ edit |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1020 | $ git commit ... <b><1></b> |
Junio C Hamano | 0299d92 | 2010-03-20 20:59:31 | [diff] [blame] | 1021 | $ edit |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1022 | $ git checkout -b branch2 <b><2></b> |
| 1023 | $ git reset --keep start <b><3></b></tt></pre> |
Junio C Hamano | 0299d92 | 2010-03-20 20:59:31 | [diff] [blame] | 1024 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1025 | <div class="colist arabic"><ol> |
Junio C Hamano | 0299d92 | 2010-03-20 20:59:31 | [diff] [blame] | 1026 | <li> |
| 1027 | <p> |
| 1028 | This commits your first edits in branch1. |
| 1029 | </p> |
| 1030 | </li> |
| 1031 | <li> |
| 1032 | <p> |
| 1033 | In the ideal world, you could have realized that the earlier |
| 1034 | commit did not belong to the new topic when you created and switched |
| 1035 | to branch2 (i.e. "git checkout -b branch2 start"), but nobody is |
| 1036 | perfect. |
| 1037 | </p> |
| 1038 | </li> |
| 1039 | <li> |
| 1040 | <p> |
| 1041 | But you can use "reset --keep" to remove the unwanted commit after |
| 1042 | you switched to "branch2". |
| 1043 | </p> |
| 1044 | </li> |
| 1045 | </ol></div> |
| 1046 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1047 | </dl></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1048 | </div> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1049 | <h2 id="_discussion">DISCUSSION</h2> |
| 1050 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1051 | <div class="paragraph"><p>The tables below show what happens when running:</p></div> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1052 | <div class="listingblock"> |
| 1053 | <div class="content"> |
| 1054 | <pre><tt>git reset --option target</tt></pre> |
| 1055 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1056 | <div class="paragraph"><p>to reset the HEAD to another commit (<tt>target</tt>) with the different |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1057 | reset options depending on the state of the files.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1058 | <div class="paragraph"><p>In these tables, A, B, C and D are some different states of a |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1059 | file. For example, the first line of the first table means that if a |
| 1060 | file is in state A in the working tree, in state B in the index, in |
| 1061 | state C in HEAD and in state D in the target, then "git reset --soft |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 1062 | target" will leave the file in the working tree in state A and in the |
| 1063 | index in state B. It resets (i.e. moves) the HEAD (i.e. the tip of |
| 1064 | the current branch, if you are on one) to "target" (which has the file |
| 1065 | in state D).</p></div> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1066 | <div class="literalblock"> |
| 1067 | <div class="content"> |
| 1068 | <pre><tt>working index HEAD target working index HEAD |
| 1069 | ---------------------------------------------------- |
| 1070 | A B C D --soft A B D |
| 1071 | --mixed A D D |
| 1072 | --hard D D D |
| 1073 | --merge (disallowed) |
| 1074 | --keep (disallowed)</tt></pre> |
| 1075 | </div></div> |
| 1076 | <div class="literalblock"> |
| 1077 | <div class="content"> |
| 1078 | <pre><tt>working index HEAD target working index HEAD |
| 1079 | ---------------------------------------------------- |
| 1080 | A B C C --soft A B C |
| 1081 | --mixed A C C |
| 1082 | --hard C C C |
| 1083 | --merge (disallowed) |
| 1084 | --keep A C C</tt></pre> |
| 1085 | </div></div> |
| 1086 | <div class="literalblock"> |
| 1087 | <div class="content"> |
| 1088 | <pre><tt>working index HEAD target working index HEAD |
| 1089 | ---------------------------------------------------- |
| 1090 | B B C D --soft B B D |
| 1091 | --mixed B D D |
| 1092 | --hard D D D |
| 1093 | --merge D D D |
| 1094 | --keep (disallowed)</tt></pre> |
| 1095 | </div></div> |
| 1096 | <div class="literalblock"> |
| 1097 | <div class="content"> |
| 1098 | <pre><tt>working index HEAD target working index HEAD |
| 1099 | ---------------------------------------------------- |
| 1100 | B B C C --soft B B C |
| 1101 | --mixed B C C |
| 1102 | --hard C C C |
| 1103 | --merge C C C |
| 1104 | --keep B C C</tt></pre> |
| 1105 | </div></div> |
| 1106 | <div class="literalblock"> |
| 1107 | <div class="content"> |
| 1108 | <pre><tt>working index HEAD target working index HEAD |
| 1109 | ---------------------------------------------------- |
| 1110 | B C C D --soft B C D |
| 1111 | --mixed B D D |
| 1112 | --hard D D D |
| 1113 | --merge (disallowed) |
| 1114 | --keep (disallowed)</tt></pre> |
| 1115 | </div></div> |
| 1116 | <div class="literalblock"> |
| 1117 | <div class="content"> |
| 1118 | <pre><tt>working index HEAD target working index HEAD |
| 1119 | ---------------------------------------------------- |
| 1120 | B C C C --soft B C C |
| 1121 | --mixed B C C |
| 1122 | --hard C C C |
| 1123 | --merge B C C |
| 1124 | --keep B C C</tt></pre> |
| 1125 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1126 | <div class="paragraph"><p>"reset --merge" is meant to be used when resetting out of a conflicted |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 1127 | merge. Any mergy operation guarantees that the working tree file that is |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1128 | involved in the merge does not have local change wrt the index before |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 1129 | it starts, and that it writes the result out to the working tree. So if |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1130 | we see some difference between the index and the target and also |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 1131 | between the index and the working tree, then it means that we are not |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1132 | resetting out from a state that a mergy operation left after failing |
| 1133 | with a conflict. That is why we disallow --merge option in this case.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1134 | <div class="paragraph"><p>"reset --keep" is meant to be used when removing some of the last |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1135 | commits in the current branch while keeping changes in the working |
| 1136 | tree. If there could be conflicts between the changes in the commit we |
| 1137 | want to remove and the changes in the working tree we want to keep, |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1138 | the reset is disallowed. That’s why it is disallowed if there are both |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1139 | changes between the working tree and HEAD, and between HEAD and the |
| 1140 | target. To be safe, it is also disallowed when there are unmerged |
| 1141 | entries.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1142 | <div class="paragraph"><p>The following tables show what happens when there are unmerged |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1143 | entries:</p></div> |
| 1144 | <div class="literalblock"> |
| 1145 | <div class="content"> |
| 1146 | <pre><tt>working index HEAD target working index HEAD |
| 1147 | ---------------------------------------------------- |
| 1148 | X U A B --soft (disallowed) |
| 1149 | --mixed X B B |
| 1150 | --hard B B B |
| 1151 | --merge B B B |
| 1152 | --keep (disallowed)</tt></pre> |
| 1153 | </div></div> |
| 1154 | <div class="literalblock"> |
| 1155 | <div class="content"> |
| 1156 | <pre><tt>working index HEAD target working index HEAD |
| 1157 | ---------------------------------------------------- |
| 1158 | X U A A --soft (disallowed) |
| 1159 | --mixed X A A |
| 1160 | --hard A A A |
| 1161 | --merge A A A |
| 1162 | --keep (disallowed)</tt></pre> |
| 1163 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1164 | <div class="paragraph"><p>X means any state and U means an unmerged index.</p></div> |
Junio C Hamano | b5a296f | 2010-08-13 02:46:36 | [diff] [blame] | 1165 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1166 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1167 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1168 | <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] | 1169 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1170 | </div> |
| 1171 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1172 | <div id="footer"> |
| 1173 | <div id="footer-text"> |
Junio C Hamano | f0944d0 | 2011-11-30 20:46:29 | [diff] [blame] | 1174 | Last updated 2011-11-30 12:46:15 PDT |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1175 | </div> |
| 1176 | </div> |
| 1177 | </body> |
| 1178 | </html> |