Junio C Hamano | 446e30b | 2014-10-16 21:30:32 | [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="application/xhtml+xml; charset=UTF-8" /> |
| 6 | <meta name="generator" content="AsciiDoc 8.6.9" /> |
| 7 | <title>giteveryday(7)</title> |
| 8 | <style type="text/css"> |
| 9 | /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ |
| 10 | |
| 11 | /* Default font. */ |
| 12 | body { |
| 13 | font-family: Georgia,serif; |
| 14 | } |
| 15 | |
| 16 | /* Title font. */ |
| 17 | h1, h2, h3, h4, h5, h6, |
| 18 | div.title, caption.title, |
| 19 | thead, p.table.header, |
| 20 | #toctitle, |
| 21 | #author, #revnumber, #revdate, #revremark, |
| 22 | #footer { |
| 23 | font-family: Arial,Helvetica,sans-serif; |
| 24 | } |
| 25 | |
| 26 | body { |
| 27 | margin: 1em 5% 1em 5%; |
| 28 | } |
| 29 | |
| 30 | a { |
| 31 | color: blue; |
| 32 | text-decoration: underline; |
| 33 | } |
| 34 | a:visited { |
| 35 | color: fuchsia; |
| 36 | } |
| 37 | |
| 38 | em { |
| 39 | font-style: italic; |
| 40 | color: navy; |
| 41 | } |
| 42 | |
| 43 | strong { |
| 44 | font-weight: bold; |
| 45 | color: #083194; |
| 46 | } |
| 47 | |
| 48 | h1, h2, h3, h4, h5, h6 { |
| 49 | color: #527bbd; |
| 50 | margin-top: 1.2em; |
| 51 | margin-bottom: 0.5em; |
| 52 | line-height: 1.3; |
| 53 | } |
| 54 | |
| 55 | h1, h2, h3 { |
| 56 | border-bottom: 2px solid silver; |
| 57 | } |
| 58 | h2 { |
| 59 | padding-top: 0.5em; |
| 60 | } |
| 61 | h3 { |
| 62 | float: left; |
| 63 | } |
| 64 | h3 + * { |
| 65 | clear: left; |
| 66 | } |
| 67 | h5 { |
| 68 | font-size: 1.0em; |
| 69 | } |
| 70 | |
| 71 | div.sectionbody { |
| 72 | margin-left: 0; |
| 73 | } |
| 74 | |
| 75 | hr { |
| 76 | border: 1px solid silver; |
| 77 | } |
| 78 | |
| 79 | p { |
| 80 | margin-top: 0.5em; |
| 81 | margin-bottom: 0.5em; |
| 82 | } |
| 83 | |
| 84 | ul, ol, li > p { |
| 85 | margin-top: 0; |
| 86 | } |
| 87 | ul > li { color: #aaa; } |
| 88 | ul > li > * { color: black; } |
| 89 | |
| 90 | .monospaced, code, pre { |
| 91 | font-family: "Courier New", Courier, monospace; |
| 92 | font-size: inherit; |
| 93 | color: navy; |
| 94 | padding: 0; |
| 95 | margin: 0; |
| 96 | } |
| 97 | pre { |
| 98 | white-space: pre-wrap; |
| 99 | } |
| 100 | |
| 101 | #author { |
| 102 | color: #527bbd; |
| 103 | font-weight: bold; |
| 104 | font-size: 1.1em; |
| 105 | } |
| 106 | #email { |
| 107 | } |
| 108 | #revnumber, #revdate, #revremark { |
| 109 | } |
| 110 | |
| 111 | #footer { |
| 112 | font-size: small; |
| 113 | border-top: 2px solid silver; |
| 114 | padding-top: 0.5em; |
| 115 | margin-top: 4.0em; |
| 116 | } |
| 117 | #footer-text { |
| 118 | float: left; |
| 119 | padding-bottom: 0.5em; |
| 120 | } |
| 121 | #footer-badges { |
| 122 | float: right; |
| 123 | padding-bottom: 0.5em; |
| 124 | } |
| 125 | |
| 126 | #preamble { |
| 127 | margin-top: 1.5em; |
| 128 | margin-bottom: 1.5em; |
| 129 | } |
| 130 | div.imageblock, div.exampleblock, div.verseblock, |
| 131 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 132 | div.admonitionblock { |
| 133 | margin-top: 1.0em; |
| 134 | margin-bottom: 1.5em; |
| 135 | } |
| 136 | div.admonitionblock { |
| 137 | margin-top: 2.0em; |
| 138 | margin-bottom: 2.0em; |
| 139 | margin-right: 10%; |
| 140 | color: #606060; |
| 141 | } |
| 142 | |
| 143 | div.content { /* Block element content. */ |
| 144 | padding: 0; |
| 145 | } |
| 146 | |
| 147 | /* Block element titles. */ |
| 148 | div.title, caption.title { |
| 149 | color: #527bbd; |
| 150 | font-weight: bold; |
| 151 | text-align: left; |
| 152 | margin-top: 1.0em; |
| 153 | margin-bottom: 0.5em; |
| 154 | } |
| 155 | div.title + * { |
| 156 | margin-top: 0; |
| 157 | } |
| 158 | |
| 159 | td div.title:first-child { |
| 160 | margin-top: 0.0em; |
| 161 | } |
| 162 | div.content div.title:first-child { |
| 163 | margin-top: 0.0em; |
| 164 | } |
| 165 | div.content + div.title { |
| 166 | margin-top: 0.0em; |
| 167 | } |
| 168 | |
| 169 | div.sidebarblock > div.content { |
| 170 | background: #ffffee; |
| 171 | border: 1px solid #dddddd; |
| 172 | border-left: 4px solid #f0f0f0; |
| 173 | padding: 0.5em; |
| 174 | } |
| 175 | |
| 176 | div.listingblock > div.content { |
| 177 | border: 1px solid #dddddd; |
| 178 | border-left: 5px solid #f0f0f0; |
| 179 | background: #f8f8f8; |
| 180 | padding: 0.5em; |
| 181 | } |
| 182 | |
| 183 | div.quoteblock, div.verseblock { |
| 184 | padding-left: 1.0em; |
| 185 | margin-left: 1.0em; |
| 186 | margin-right: 10%; |
| 187 | border-left: 5px solid #f0f0f0; |
| 188 | color: #888; |
| 189 | } |
| 190 | |
| 191 | div.quoteblock > div.attribution { |
| 192 | padding-top: 0.5em; |
| 193 | text-align: right; |
| 194 | } |
| 195 | |
| 196 | div.verseblock > pre.content { |
| 197 | font-family: inherit; |
| 198 | font-size: inherit; |
| 199 | } |
| 200 | div.verseblock > div.attribution { |
| 201 | padding-top: 0.75em; |
| 202 | text-align: left; |
| 203 | } |
| 204 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
| 205 | div.verseblock + div.attribution { |
| 206 | text-align: left; |
| 207 | } |
| 208 | |
| 209 | div.admonitionblock .icon { |
| 210 | vertical-align: top; |
| 211 | font-size: 1.1em; |
| 212 | font-weight: bold; |
| 213 | text-decoration: underline; |
| 214 | color: #527bbd; |
| 215 | padding-right: 0.5em; |
| 216 | } |
| 217 | div.admonitionblock td.content { |
| 218 | padding-left: 0.5em; |
| 219 | border-left: 3px solid #dddddd; |
| 220 | } |
| 221 | |
| 222 | div.exampleblock > div.content { |
| 223 | border-left: 3px solid #dddddd; |
| 224 | padding-left: 0.5em; |
| 225 | } |
| 226 | |
| 227 | div.imageblock div.content { padding-left: 0; } |
| 228 | span.image img { border-style: none; vertical-align: text-bottom; } |
| 229 | a.image:visited { color: white; } |
| 230 | |
| 231 | dl { |
| 232 | margin-top: 0.8em; |
| 233 | margin-bottom: 0.8em; |
| 234 | } |
| 235 | dt { |
| 236 | margin-top: 0.5em; |
| 237 | margin-bottom: 0; |
| 238 | font-style: normal; |
| 239 | color: navy; |
| 240 | } |
| 241 | dd > *:first-child { |
| 242 | margin-top: 0.1em; |
| 243 | } |
| 244 | |
| 245 | ul, ol { |
| 246 | list-style-position: outside; |
| 247 | } |
| 248 | ol.arabic { |
| 249 | list-style-type: decimal; |
| 250 | } |
| 251 | ol.loweralpha { |
| 252 | list-style-type: lower-alpha; |
| 253 | } |
| 254 | ol.upperalpha { |
| 255 | list-style-type: upper-alpha; |
| 256 | } |
| 257 | ol.lowerroman { |
| 258 | list-style-type: lower-roman; |
| 259 | } |
| 260 | ol.upperroman { |
| 261 | list-style-type: upper-roman; |
| 262 | } |
| 263 | |
| 264 | div.compact ul, div.compact ol, |
| 265 | div.compact p, div.compact p, |
| 266 | div.compact div, div.compact div { |
| 267 | margin-top: 0.1em; |
| 268 | margin-bottom: 0.1em; |
| 269 | } |
| 270 | |
| 271 | tfoot { |
| 272 | font-weight: bold; |
| 273 | } |
| 274 | td > div.verse { |
| 275 | white-space: pre; |
| 276 | } |
| 277 | |
| 278 | div.hdlist { |
| 279 | margin-top: 0.8em; |
| 280 | margin-bottom: 0.8em; |
| 281 | } |
| 282 | div.hdlist tr { |
| 283 | padding-bottom: 15px; |
| 284 | } |
| 285 | dt.hdlist1.strong, td.hdlist1.strong { |
| 286 | font-weight: bold; |
| 287 | } |
| 288 | td.hdlist1 { |
| 289 | vertical-align: top; |
| 290 | font-style: normal; |
| 291 | padding-right: 0.8em; |
| 292 | color: navy; |
| 293 | } |
| 294 | td.hdlist2 { |
| 295 | vertical-align: top; |
| 296 | } |
| 297 | div.hdlist.compact tr { |
| 298 | margin: 0; |
| 299 | padding-bottom: 0; |
| 300 | } |
| 301 | |
| 302 | .comment { |
| 303 | background: yellow; |
| 304 | } |
| 305 | |
| 306 | .footnote, .footnoteref { |
| 307 | font-size: 0.8em; |
| 308 | } |
| 309 | |
| 310 | span.footnote, span.footnoteref { |
| 311 | vertical-align: super; |
| 312 | } |
| 313 | |
| 314 | #footnotes { |
| 315 | margin: 20px 0 20px 0; |
| 316 | padding: 7px 0 0 0; |
| 317 | } |
| 318 | |
| 319 | #footnotes div.footnote { |
| 320 | margin: 0 0 5px 0; |
| 321 | } |
| 322 | |
| 323 | #footnotes hr { |
| 324 | border: none; |
| 325 | border-top: 1px solid silver; |
| 326 | height: 1px; |
| 327 | text-align: left; |
| 328 | margin-left: 0; |
| 329 | width: 20%; |
| 330 | min-width: 100px; |
| 331 | } |
| 332 | |
| 333 | div.colist td { |
| 334 | padding-right: 0.5em; |
| 335 | padding-bottom: 0.3em; |
| 336 | vertical-align: top; |
| 337 | } |
| 338 | div.colist td img { |
| 339 | margin-top: 0.3em; |
| 340 | } |
| 341 | |
| 342 | @media print { |
| 343 | #footer-badges { display: none; } |
| 344 | } |
| 345 | |
| 346 | #toc { |
| 347 | margin-bottom: 2.5em; |
| 348 | } |
| 349 | |
| 350 | #toctitle { |
| 351 | color: #527bbd; |
| 352 | font-size: 1.1em; |
| 353 | font-weight: bold; |
| 354 | margin-top: 1.0em; |
| 355 | margin-bottom: 0.1em; |
| 356 | } |
| 357 | |
| 358 | div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 359 | margin-top: 0; |
| 360 | margin-bottom: 0; |
| 361 | } |
| 362 | div.toclevel2 { |
| 363 | margin-left: 2em; |
| 364 | font-size: 0.9em; |
| 365 | } |
| 366 | div.toclevel3 { |
| 367 | margin-left: 4em; |
| 368 | font-size: 0.9em; |
| 369 | } |
| 370 | div.toclevel4 { |
| 371 | margin-left: 6em; |
| 372 | font-size: 0.9em; |
| 373 | } |
| 374 | |
| 375 | span.aqua { color: aqua; } |
| 376 | span.black { color: black; } |
| 377 | span.blue { color: blue; } |
| 378 | span.fuchsia { color: fuchsia; } |
| 379 | span.gray { color: gray; } |
| 380 | span.green { color: green; } |
| 381 | span.lime { color: lime; } |
| 382 | span.maroon { color: maroon; } |
| 383 | span.navy { color: navy; } |
| 384 | span.olive { color: olive; } |
| 385 | span.purple { color: purple; } |
| 386 | span.red { color: red; } |
| 387 | span.silver { color: silver; } |
| 388 | span.teal { color: teal; } |
| 389 | span.white { color: white; } |
| 390 | span.yellow { color: yellow; } |
| 391 | |
| 392 | span.aqua-background { background: aqua; } |
| 393 | span.black-background { background: black; } |
| 394 | span.blue-background { background: blue; } |
| 395 | span.fuchsia-background { background: fuchsia; } |
| 396 | span.gray-background { background: gray; } |
| 397 | span.green-background { background: green; } |
| 398 | span.lime-background { background: lime; } |
| 399 | span.maroon-background { background: maroon; } |
| 400 | span.navy-background { background: navy; } |
| 401 | span.olive-background { background: olive; } |
| 402 | span.purple-background { background: purple; } |
| 403 | span.red-background { background: red; } |
| 404 | span.silver-background { background: silver; } |
| 405 | span.teal-background { background: teal; } |
| 406 | span.white-background { background: white; } |
| 407 | span.yellow-background { background: yellow; } |
| 408 | |
| 409 | span.big { font-size: 2em; } |
| 410 | span.small { font-size: 0.6em; } |
| 411 | |
| 412 | span.underline { text-decoration: underline; } |
| 413 | span.overline { text-decoration: overline; } |
| 414 | span.line-through { text-decoration: line-through; } |
| 415 | |
| 416 | div.unbreakable { page-break-inside: avoid; } |
| 417 | |
| 418 | |
| 419 | /* |
| 420 | * xhtml11 specific |
| 421 | * |
| 422 | * */ |
| 423 | |
| 424 | div.tableblock { |
| 425 | margin-top: 1.0em; |
| 426 | margin-bottom: 1.5em; |
| 427 | } |
| 428 | div.tableblock > table { |
| 429 | border: 3px solid #527bbd; |
| 430 | } |
| 431 | thead, p.table.header { |
| 432 | font-weight: bold; |
| 433 | color: #527bbd; |
| 434 | } |
| 435 | p.table { |
| 436 | margin-top: 0; |
| 437 | } |
| 438 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 439 | div.tableblock > table[frame="void"] { |
| 440 | border-style: none; |
| 441 | } |
| 442 | div.tableblock > table[frame="hsides"] { |
| 443 | border-left-style: none; |
| 444 | border-right-style: none; |
| 445 | } |
| 446 | div.tableblock > table[frame="vsides"] { |
| 447 | border-top-style: none; |
| 448 | border-bottom-style: none; |
| 449 | } |
| 450 | |
| 451 | |
| 452 | /* |
| 453 | * html5 specific |
| 454 | * |
| 455 | * */ |
| 456 | |
| 457 | table.tableblock { |
| 458 | margin-top: 1.0em; |
| 459 | margin-bottom: 1.5em; |
| 460 | } |
| 461 | thead, p.tableblock.header { |
| 462 | font-weight: bold; |
| 463 | color: #527bbd; |
| 464 | } |
| 465 | p.tableblock { |
| 466 | margin-top: 0; |
| 467 | } |
| 468 | table.tableblock { |
| 469 | border-width: 3px; |
| 470 | border-spacing: 0px; |
| 471 | border-style: solid; |
| 472 | border-color: #527bbd; |
| 473 | border-collapse: collapse; |
| 474 | } |
| 475 | th.tableblock, td.tableblock { |
| 476 | border-width: 1px; |
| 477 | padding: 4px; |
| 478 | border-style: solid; |
| 479 | border-color: #527bbd; |
| 480 | } |
| 481 | |
| 482 | table.tableblock.frame-topbot { |
| 483 | border-left-style: hidden; |
| 484 | border-right-style: hidden; |
| 485 | } |
| 486 | table.tableblock.frame-sides { |
| 487 | border-top-style: hidden; |
| 488 | border-bottom-style: hidden; |
| 489 | } |
| 490 | table.tableblock.frame-none { |
| 491 | border-style: hidden; |
| 492 | } |
| 493 | |
| 494 | th.tableblock.halign-left, td.tableblock.halign-left { |
| 495 | text-align: left; |
| 496 | } |
| 497 | th.tableblock.halign-center, td.tableblock.halign-center { |
| 498 | text-align: center; |
| 499 | } |
| 500 | th.tableblock.halign-right, td.tableblock.halign-right { |
| 501 | text-align: right; |
| 502 | } |
| 503 | |
| 504 | th.tableblock.valign-top, td.tableblock.valign-top { |
| 505 | vertical-align: top; |
| 506 | } |
| 507 | th.tableblock.valign-middle, td.tableblock.valign-middle { |
| 508 | vertical-align: middle; |
| 509 | } |
| 510 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { |
| 511 | vertical-align: bottom; |
| 512 | } |
| 513 | |
| 514 | |
| 515 | /* |
| 516 | * manpage specific |
| 517 | * |
| 518 | * */ |
| 519 | |
| 520 | body.manpage h1 { |
| 521 | padding-top: 0.5em; |
| 522 | padding-bottom: 0.5em; |
| 523 | border-top: 2px solid silver; |
| 524 | border-bottom: 2px solid silver; |
| 525 | } |
| 526 | body.manpage h2 { |
| 527 | border-style: none; |
| 528 | } |
| 529 | body.manpage div.sectionbody { |
| 530 | margin-left: 3em; |
| 531 | } |
| 532 | |
| 533 | @media print { |
| 534 | body.manpage div#toc { display: none; } |
| 535 | } |
| 536 | |
| 537 | |
| 538 | </style> |
| 539 | <script type="text/javascript"> |
| 540 | /*<+'])'); |
| 583 | // Function that scans the DOM tree for header elements (the DOM2 |
| 584 | // nodeIterator API would be a better technique but not supported by all |
| 585 | // browsers). |
| 586 | var iterate = function (el) { |
| 587 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 588 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 589 | var mo = re.exec(i.tagName); |
| 590 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 591 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 592 | } |
| 593 | iterate(i); |
| 594 | } |
| 595 | } |
| 596 | } |
| 597 | iterate(el); |
| 598 | return result; |
| 599 | } |
| 600 | |
| 601 | var toc = document.getElementById("toc"); |
| 602 | if (!toc) { |
| 603 | return; |
| 604 | } |
| 605 | |
| 606 | // Delete existing TOC entries in case we're reloading the TOC. |
| 607 | var tocEntriesToRemove = []; |
| 608 | var i; |
| 609 | for (i = 0; i < toc.childNodes.length; i++) { |
| 610 | var entry = toc.childNodes[i]; |
| 611 | if (entry.nodeName.toLowerCase() == 'div' |
| 612 | && entry.getAttribute("class") |
| 613 | && entry.getAttribute("class").match(/^toclevel/)) |
| 614 | tocEntriesToRemove.push(entry); |
| 615 | } |
| 616 | for (i = 0; i < tocEntriesToRemove.length; i++) { |
| 617 | toc.removeChild(tocEntriesToRemove[i]); |
| 618 | } |
| 619 | |
| 620 | // Rebuild TOC entries. |
| 621 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 622 | for (var i = 0; i < entries.length; ++i) { |
| 623 | var entry = entries[i]; |
| 624 | if (entry.element.id == "") |
| 625 | entry.element.id = "_toc_" + i; |
| 626 | var a = document.createElement("a"); |
| 627 | a.href = "#" + entry.element.id; |
| 628 | a.appendChild(document.createTextNode(entry.text)); |
| 629 | var div = document.createElement("div"); |
| 630 | div.appendChild(a); |
| 631 | div.className = "toclevel" + entry.toclevel; |
| 632 | toc.appendChild(div); |
| 633 | } |
| 634 | if (entries.length == 0) |
| 635 | toc.parentNode.removeChild(toc); |
| 636 | }, |
| 637 | |
| 638 | |
| 639 | ///////////////////////////////////////////////////////////////////// |
| 640 | // Footnotes generator |
| 641 | ///////////////////////////////////////////////////////////////////// |
| 642 | |
| 643 | /* Based on footnote generation code from: |
| 644 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 645 | */ |
| 646 | |
| 647 | footnotes: function () { |
| 648 | // Delete existing footnote entries in case we're reloading the footnodes. |
| 649 | var i; |
| 650 | var noteholder = document.getElementById("footnotes"); |
| 651 | if (!noteholder) { |
| 652 | return; |
| 653 | } |
| 654 | var entriesToRemove = []; |
| 655 | for (i = 0; i < noteholder.childNodes.length; i++) { |
| 656 | var entry = noteholder.childNodes[i]; |
| 657 | if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") |
| 658 | entriesToRemove.push(entry); |
| 659 | } |
| 660 | for (i = 0; i < entriesToRemove.length; i++) { |
| 661 | noteholder.removeChild(entriesToRemove[i]); |
| 662 | } |
| 663 | |
| 664 | // Rebuild footnote entries. |
| 665 | var cont = document.getElementById("content"); |
| 666 | var spans = cont.getElementsByTagName("span"); |
| 667 | var refs = {}; |
| 668 | var n = 0; |
| 669 | for (i=0; i<spans.length; i++) { |
| 670 | if (spans[i].className == "footnote") { |
| 671 | n++; |
| 672 | var note = spans[i].getAttribute("data-note"); |
| 673 | if (!note) { |
| 674 | // Use [\s\S] in place of . so multi-line matches work. |
| 675 | // Because JavaScript has no s (dotall) regex flag. |
| 676 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 677 | spans[i].innerHTML = |
| 678 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 679 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 680 | spans[i].setAttribute("data-note", note); |
| 681 | } |
| 682 | noteholder.innerHTML += |
| 683 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 684 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 685 | n + "</a>. " + note + "</div>"; |
| 686 | var id =spans[i].getAttribute("id"); |
| 687 | if (id != null) refs["#"+id] = n; |
| 688 | } |
| 689 | } |
| 690 | if (n == 0) |
| 691 | noteholder.parentNode.removeChild(noteholder); |
| 692 | else { |
| 693 | // Process footnoterefs. |
| 694 | for (i=0; i<spans.length; i++) { |
| 695 | if (spans[i].className == "footnoteref") { |
| 696 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 697 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 698 | n = refs[href]; |
| 699 | spans[i].innerHTML = |
| 700 | "[<a href='#_footnote_" + n + |
| 701 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 702 | } |
| 703 | } |
| 704 | } |
| 705 | }, |
| 706 | |
| 707 | install: function(toclevels) { |
| 708 | var timerId; |
| 709 | |
| 710 | function reinstall() { |
| 711 | asciidoc.footnotes(); |
| 712 | if (toclevels) { |
| 713 | asciidoc.toc(toclevels); |
| 714 | } |
| 715 | } |
| 716 | |
| 717 | function reinstallAndRemoveTimer() { |
| 718 | clearInterval(timerId); |
| 719 | reinstall(); |
| 720 | } |
| 721 | |
| 722 | timerId = setInterval(reinstall, 500); |
| 723 | if (document.addEventListener) |
| 724 | document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); |
| 725 | else |
| 726 | window.onload = reinstallAndRemoveTimer; |
| 727 | } |
| 728 | |
| 729 | } |
| 730 | asciidoc.install(); |
| 731 | /*]]>*/ |
| 732 | </script> |
| 733 | </head> |
| 734 | <body class="manpage"> |
| 735 | <div id="header"> |
| 736 | <h1> |
| 737 | giteveryday(7) Manual Page |
| 738 | </h1> |
| 739 | <h2>NAME</h2> |
| 740 | <div class="sectionbody"> |
| 741 | <p>giteveryday - |
| 742 | A useful minimum set of commands for Everyday Git |
| 743 | </p> |
| 744 | </div> |
| 745 | </div> |
| 746 | <div id="content"> |
| 747 | <div class="sect1"> |
| 748 | <h2 id="_synopsis">SYNOPSIS</h2> |
| 749 | <div class="sectionbody"> |
| 750 | <div class="paragraph"><p>Everyday Git With 20 Commands Or So</p></div> |
| 751 | </div> |
| 752 | </div> |
| 753 | <div class="sect1"> |
| 754 | <h2 id="_description">DESCRIPTION</h2> |
| 755 | <div class="sectionbody"> |
| 756 | <div class="paragraph"><p>Git users can broadly be grouped into four categories for the purposes of |
| 757 | describing here a small set of useful command for everyday Git.</p></div> |
| 758 | <div class="ulist"><ul> |
| 759 | <li> |
| 760 | <p> |
| 761 | <a href="#STANDALONE">Individual Developer (Standalone)</a> commands are essential |
| 762 | for anybody who makes a commit, even for somebody who works alone. |
| 763 | </p> |
| 764 | </li> |
| 765 | <li> |
| 766 | <p> |
| 767 | If you work with other people, you will need commands listed in |
| 768 | the <a href="#PARTICIPANT">Individual Developer (Participant)</a> section as well. |
| 769 | </p> |
| 770 | </li> |
| 771 | <li> |
| 772 | <p> |
| 773 | People who play the <a href="#INTEGRATOR">Integrator</a> role need to learn some |
| 774 | more commands in addition to the above. |
| 775 | </p> |
| 776 | </li> |
| 777 | <li> |
| 778 | <p> |
| 779 | <a href="#ADMINISTRATION">Repository Administration</a> commands are for system |
| 780 | administrators who are responsible for the care and feeding |
| 781 | of Git repositories. |
| 782 | </p> |
| 783 | </li> |
| 784 | </ul></div> |
| 785 | </div> |
| 786 | </div> |
| 787 | <div class="sect1"> |
| 788 | <h2 id="_individual_developer_standalone_a_id_standalone_a">Individual Developer (Standalone)<a id="STANDALONE"></a></h2> |
| 789 | <div class="sectionbody"> |
| 790 | <div class="paragraph"><p>A standalone individual developer does not exchange patches with |
| 791 | other people, and works alone in a single repository, using the |
| 792 | following commands.</p></div> |
| 793 | <div class="ulist"><ul> |
| 794 | <li> |
| 795 | <p> |
| 796 | <a href="git-init.html">git-init(1)</a> to create a new repository. |
| 797 | </p> |
| 798 | </li> |
| 799 | <li> |
| 800 | <p> |
| 801 | <a href="git-log.html">git-log(1)</a> to see what happened. |
| 802 | </p> |
| 803 | </li> |
| 804 | <li> |
| 805 | <p> |
| 806 | <a href="git-checkout.html">git-checkout(1)</a> and <a href="git-branch.html">git-branch(1)</a> to switch |
| 807 | branches. |
| 808 | </p> |
| 809 | </li> |
| 810 | <li> |
| 811 | <p> |
| 812 | <a href="git-add.html">git-add(1)</a> to manage the index file. |
| 813 | </p> |
| 814 | </li> |
| 815 | <li> |
| 816 | <p> |
| 817 | <a href="git-diff.html">git-diff(1)</a> and <a href="git-status.html">git-status(1)</a> to see what |
| 818 | you are in the middle of doing. |
| 819 | </p> |
| 820 | </li> |
| 821 | <li> |
| 822 | <p> |
| 823 | <a href="git-commit.html">git-commit(1)</a> to advance the current branch. |
| 824 | </p> |
| 825 | </li> |
| 826 | <li> |
| 827 | <p> |
| 828 | <a href="git-reset.html">git-reset(1)</a> and <a href="git-checkout.html">git-checkout(1)</a> (with |
| 829 | pathname parameters) to undo changes. |
| 830 | </p> |
| 831 | </li> |
| 832 | <li> |
| 833 | <p> |
| 834 | <a href="git-merge.html">git-merge(1)</a> to merge between local branches. |
| 835 | </p> |
| 836 | </li> |
| 837 | <li> |
| 838 | <p> |
| 839 | <a href="git-rebase.html">git-rebase(1)</a> to maintain topic branches. |
| 840 | </p> |
| 841 | </li> |
| 842 | <li> |
| 843 | <p> |
| 844 | <a href="git-tag.html">git-tag(1)</a> to mark a known point. |
| 845 | </p> |
| 846 | </li> |
| 847 | </ul></div> |
| 848 | <div class="sect2"> |
| 849 | <h3 id="_examples">Examples</h3> |
| 850 | <div class="dlist"><dl> |
| 851 | <dt class="hdlist1"> |
| 852 | Use a tarball as a starting point for a new repository. |
| 853 | </dt> |
| 854 | <dd> |
| 855 | <div class="listingblock"> |
| 856 | <div class="content"> |
| 857 | <pre><code>$ tar zxf frotz.tar.gz |
| 858 | $ cd frotz |
| 859 | $ git init |
| 860 | $ git add . <b><1></b> |
| 861 | $ git commit -m "import of frotz source tree." |
| 862 | $ git tag v2.43 <b><2></b></code></pre> |
| 863 | </div></div> |
| 864 | <div class="colist arabic"><ol> |
| 865 | <li> |
| 866 | <p> |
| 867 | add everything under the current directory. |
| 868 | </p> |
| 869 | </li> |
| 870 | <li> |
| 871 | <p> |
| 872 | make a lightweight, unannotated tag. |
| 873 | </p> |
| 874 | </li> |
| 875 | </ol></div> |
| 876 | </dd> |
| 877 | <dt class="hdlist1"> |
| 878 | Create a topic branch and develop. |
| 879 | </dt> |
| 880 | <dd> |
| 881 | <div class="listingblock"> |
| 882 | <div class="content"> |
| 883 | <pre><code>$ git checkout -b alsa-audio <b><1></b> |
| 884 | $ edit/compile/test |
| 885 | $ git checkout -- curses/ux_audio_oss.c <b><2></b> |
| 886 | $ git add curses/ux_audio_alsa.c <b><3></b> |
| 887 | $ edit/compile/test |
| 888 | $ git diff HEAD <b><4></b> |
| 889 | $ git commit -a -s <b><5></b> |
| 890 | $ edit/compile/test |
| 891 | $ git diff HEAD^ <b><6></b> |
| 892 | $ git commit -a --amend <b><7></b> |
| 893 | $ git checkout master <b><8></b> |
| 894 | $ git merge alsa-audio <b><9></b> |
| 895 | $ git log --since='3 days ago' <b><10></b> |
| 896 | $ git log v2.43.. curses/ <b><11></b></code></pre> |
| 897 | </div></div> |
| 898 | <div class="colist arabic"><ol> |
| 899 | <li> |
| 900 | <p> |
| 901 | create a new topic branch. |
| 902 | </p> |
| 903 | </li> |
| 904 | <li> |
| 905 | <p> |
| 906 | revert your botched changes in <code>curses/ux_audio_oss.c</code>. |
| 907 | </p> |
| 908 | </li> |
| 909 | <li> |
| 910 | <p> |
| 911 | you need to tell Git if you added a new file; removal and |
| 912 | modification will be caught if you do <code>git commit -a</code> later. |
| 913 | </p> |
| 914 | </li> |
| 915 | <li> |
| 916 | <p> |
| 917 | to see what changes you are committing. |
| 918 | </p> |
| 919 | </li> |
| 920 | <li> |
| 921 | <p> |
| 922 | commit everything, as you have tested, with your sign-off. |
| 923 | </p> |
| 924 | </li> |
| 925 | <li> |
| 926 | <p> |
| 927 | look at all your changes including the previous commit. |
| 928 | </p> |
| 929 | </li> |
| 930 | <li> |
| 931 | <p> |
| 932 | amend the previous commit, adding all your new changes, |
| 933 | using your original message. |
| 934 | </p> |
| 935 | </li> |
| 936 | <li> |
| 937 | <p> |
| 938 | switch to the master branch. |
| 939 | </p> |
| 940 | </li> |
| 941 | <li> |
| 942 | <p> |
| 943 | merge a topic branch into your master branch. |
| 944 | </p> |
| 945 | </li> |
| 946 | <li> |
| 947 | <p> |
| 948 | review commit logs; other forms to limit output can be |
| 949 | combined and include <code>-10</code> (to show up to 10 commits), |
| 950 | <code>--until=2005-12-10</code>, etc. |
| 951 | </p> |
| 952 | </li> |
| 953 | <li> |
| 954 | <p> |
| 955 | view only the changes that touch what’s in <code>curses/</code> |
| 956 | directory, since <code>v2.43</code> tag. |
| 957 | </p> |
| 958 | </li> |
| 959 | </ol></div> |
| 960 | </dd> |
| 961 | </dl></div> |
| 962 | </div> |
| 963 | </div> |
| 964 | </div> |
| 965 | <div class="sect1"> |
| 966 | <h2 id="_individual_developer_participant_a_id_participant_a">Individual Developer (Participant)<a id="PARTICIPANT"></a></h2> |
| 967 | <div class="sectionbody"> |
| 968 | <div class="paragraph"><p>A developer working as a participant in a group project needs to |
| 969 | learn how to communicate with others, and uses these commands in |
| 970 | addition to the ones needed by a standalone developer.</p></div> |
| 971 | <div class="ulist"><ul> |
| 972 | <li> |
| 973 | <p> |
| 974 | <a href="git-clone.html">git-clone(1)</a> from the upstream to prime your local |
| 975 | repository. |
| 976 | </p> |
| 977 | </li> |
| 978 | <li> |
| 979 | <p> |
| 980 | <a href="git-pull.html">git-pull(1)</a> and <a href="git-fetch.html">git-fetch(1)</a> from "origin" |
| 981 | to keep up-to-date with the upstream. |
| 982 | </p> |
| 983 | </li> |
| 984 | <li> |
| 985 | <p> |
| 986 | <a href="git-push.html">git-push(1)</a> to shared repository, if you adopt CVS |
| 987 | style shared repository workflow. |
| 988 | </p> |
| 989 | </li> |
| 990 | <li> |
| 991 | <p> |
| 992 | <a href="git-format-patch.html">git-format-patch(1)</a> to prepare e-mail submission, if |
| 993 | you adopt Linux kernel-style public forum workflow. |
| 994 | </p> |
| 995 | </li> |
| 996 | <li> |
| 997 | <p> |
| 998 | <a href="git-send-email.html">git-send-email(1)</a> to send your e-mail submission without |
| 999 | corruption by your MUA. |
| 1000 | </p> |
| 1001 | </li> |
| 1002 | <li> |
| 1003 | <p> |
| 1004 | <a href="git-request-pull.html">git-request-pull(1)</a> to create a summary of changes |
| 1005 | for your upstream to pull. |
| 1006 | </p> |
| 1007 | </li> |
| 1008 | </ul></div> |
| 1009 | <div class="sect2"> |
| 1010 | <h3 id="_examples_2">Examples</h3> |
| 1011 | <div class="dlist"><dl> |
| 1012 | <dt class="hdlist1"> |
| 1013 | Clone the upstream and work on it. Feed changes to upstream. |
| 1014 | </dt> |
| 1015 | <dd> |
| 1016 | <div class="listingblock"> |
| 1017 | <div class="content"> |
| 1018 | <pre><code>$ git clone git://git.kernel.org/pub/scm/.../torvalds/linux-2.6 my2.6 |
| 1019 | $ cd my2.6 |
| 1020 | $ git checkout -b mine master <b><1></b> |
| 1021 | $ edit/compile/test; git commit -a -s <b><2></b> |
| 1022 | $ git format-patch master <b><3></b> |
| 1023 | $ git send-email --to="person <email@example.com>" 00*.patch <b><4></b> |
| 1024 | $ git checkout master <b><5></b> |
| 1025 | $ git pull <b><6></b> |
| 1026 | $ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <b><7></b> |
| 1027 | $ git ls-remote --heads http://git.kernel.org/.../jgarzik/libata-dev.git <b><8></b> |
| 1028 | $ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <b><9></b> |
| 1029 | $ git reset --hard ORIG_HEAD <b><10></b> |
| 1030 | $ git gc <b><11></b></code></pre> |
| 1031 | </div></div> |
| 1032 | <div class="colist arabic"><ol> |
| 1033 | <li> |
| 1034 | <p> |
| 1035 | checkout a new branch <code>mine</code> from master. |
| 1036 | </p> |
| 1037 | </li> |
| 1038 | <li> |
| 1039 | <p> |
| 1040 | repeat as needed. |
| 1041 | </p> |
| 1042 | </li> |
| 1043 | <li> |
| 1044 | <p> |
| 1045 | extract patches from your branch, relative to master, |
| 1046 | </p> |
| 1047 | </li> |
| 1048 | <li> |
| 1049 | <p> |
| 1050 | and email them. |
| 1051 | </p> |
| 1052 | </li> |
| 1053 | <li> |
| 1054 | <p> |
| 1055 | return to <code>master</code>, ready to see what’s new |
| 1056 | </p> |
| 1057 | </li> |
| 1058 | <li> |
| 1059 | <p> |
| 1060 | <code>git pull</code> fetches from <code>origin</code> by default and merges into the |
| 1061 | current branch. |
| 1062 | </p> |
| 1063 | </li> |
| 1064 | <li> |
| 1065 | <p> |
| 1066 | immediately after pulling, look at the changes done upstream |
| 1067 | since last time we checked, only in the |
| 1068 | area we are interested in. |
| 1069 | </p> |
| 1070 | </li> |
| 1071 | <li> |
| 1072 | <p> |
| 1073 | check the branch names in an external repository (if not known). |
| 1074 | </p> |
| 1075 | </li> |
| 1076 | <li> |
| 1077 | <p> |
| 1078 | fetch from a specific branch <code>ALL</code> from a specific repository |
| 1079 | and merge it. |
| 1080 | </p> |
| 1081 | </li> |
| 1082 | <li> |
| 1083 | <p> |
| 1084 | revert the pull. |
| 1085 | </p> |
| 1086 | </li> |
| 1087 | <li> |
| 1088 | <p> |
| 1089 | garbage collect leftover objects from reverted pull. |
| 1090 | </p> |
| 1091 | </li> |
| 1092 | </ol></div> |
| 1093 | </dd> |
| 1094 | <dt class="hdlist1"> |
| 1095 | Push into another repository. |
| 1096 | </dt> |
| 1097 | <dd> |
| 1098 | <div class="listingblock"> |
| 1099 | <div class="content"> |
| 1100 | <pre><code>satellite$ git clone mothership:frotz frotz <b><1></b> |
| 1101 | satellite$ cd frotz |
| 1102 | satellite$ git config --get-regexp '^(remote|branch)\.' <b><2></b> |
| 1103 | remote.origin.url mothership:frotz |
| 1104 | remote.origin.fetch refs/heads/*:refs/remotes/origin/* |
| 1105 | branch.master.remote origin |
| 1106 | branch.master.merge refs/heads/master |
| 1107 | satellite$ git config remote.origin.push \ |
| 1108 | +refs/heads/*:refs/remotes/satellite/* <b><3></b> |
| 1109 | satellite$ edit/compile/test/commit |
| 1110 | satellite$ git push origin <b><4></b> |
| 1111 | |
| 1112 | mothership$ cd frotz |
| 1113 | mothership$ git checkout master |
| 1114 | mothership$ git merge satellite/master <b><5></b></code></pre> |
| 1115 | </div></div> |
| 1116 | <div class="colist arabic"><ol> |
| 1117 | <li> |
| 1118 | <p> |
| 1119 | mothership machine has a frotz repository under your home |
| 1120 | directory; clone from it to start a repository on the satellite |
| 1121 | machine. |
| 1122 | </p> |
| 1123 | </li> |
| 1124 | <li> |
| 1125 | <p> |
| 1126 | clone sets these configuration variables by default. |
| 1127 | It arranges <code>git pull</code> to fetch and store the branches of mothership |
| 1128 | machine to local <code>remotes/origin/*</code> remote-tracking branches. |
| 1129 | </p> |
| 1130 | </li> |
| 1131 | <li> |
| 1132 | <p> |
| 1133 | arrange <code>git push</code> to push all local branches to |
| 1134 | their corresponding branch of the mothership machine. |
| 1135 | </p> |
| 1136 | </li> |
| 1137 | <li> |
| 1138 | <p> |
| 1139 | push will stash all our work away on <code>remotes/satellite/*</code> |
| 1140 | remote-tracking branches on the mothership machine. You could use this |
| 1141 | as a back-up method. Likewise, you can pretend that mothership |
| 1142 | "fetched" from you (useful when access is one sided). |
| 1143 | </p> |
| 1144 | </li> |
| 1145 | <li> |
| 1146 | <p> |
| 1147 | on mothership machine, merge the work done on the satellite |
| 1148 | machine into the master branch. |
| 1149 | </p> |
| 1150 | </li> |
| 1151 | </ol></div> |
| 1152 | </dd> |
| 1153 | <dt class="hdlist1"> |
| 1154 | Branch off of a specific tag. |
| 1155 | </dt> |
| 1156 | <dd> |
| 1157 | <div class="listingblock"> |
| 1158 | <div class="content"> |
| 1159 | <pre><code>$ git checkout -b private2.6.14 v2.6.14 <b><1></b> |
| 1160 | $ edit/compile/test; git commit -a |
| 1161 | $ git checkout master |
| 1162 | $ git cherry-pick v2.6.14..private2.6.14 <b><2></b></code></pre> |
| 1163 | </div></div> |
| 1164 | <div class="colist arabic"><ol> |
| 1165 | <li> |
| 1166 | <p> |
| 1167 | create a private branch based on a well known (but somewhat behind) |
| 1168 | tag. |
| 1169 | </p> |
| 1170 | </li> |
| 1171 | <li> |
| 1172 | <p> |
| 1173 | forward port all changes in <code>private2.6.14</code> branch to <code>master</code> branch |
| 1174 | without a formal "merging". Or longhand<br /> |
| 1175 | <code>git format-patch -k -m --stdout v2.6.14..private2.6.14 | |
| 1176 | git am -3 -k</code> |
| 1177 | </p> |
| 1178 | </li> |
| 1179 | </ol></div> |
| 1180 | </dd> |
| 1181 | </dl></div> |
| 1182 | <div class="paragraph"><p>An alternate participant submission mechanism is using the |
| 1183 | <code>git request-pull</code> or pull-request mechanisms (e.g as used on |
| 1184 | GitHub (www.github.com) to notify your upstream of your |
| 1185 | contribution.</p></div> |
| 1186 | </div> |
| 1187 | </div> |
| 1188 | </div> |
| 1189 | <div class="sect1"> |
| 1190 | <h2 id="_integrator_a_id_integrator_a">Integrator<a id="INTEGRATOR"></a></h2> |
| 1191 | <div class="sectionbody"> |
| 1192 | <div class="paragraph"><p>A fairly central person acting as the integrator in a group |
| 1193 | project receives changes made by others, reviews and integrates |
| 1194 | them and publishes the result for others to use, using these |
| 1195 | commands in addition to the ones needed by participants.</p></div> |
| 1196 | <div class="paragraph"><p>This section can also be used by those who respond to <code>git |
| 1197 | request-pull</code> or pull-request on GitHub (www.github.com) to |
| 1198 | integrate the work of others into their history. An sub-area |
| 1199 | lieutenant for a repository will act both as a participant and |
| 1200 | as an integrator.</p></div> |
| 1201 | <div class="ulist"><ul> |
| 1202 | <li> |
| 1203 | <p> |
| 1204 | <a href="git-am.html">git-am(1)</a> to apply patches e-mailed in from your |
| 1205 | contributors. |
| 1206 | </p> |
| 1207 | </li> |
| 1208 | <li> |
| 1209 | <p> |
| 1210 | <a href="git-pull.html">git-pull(1)</a> to merge from your trusted lieutenants. |
| 1211 | </p> |
| 1212 | </li> |
| 1213 | <li> |
| 1214 | <p> |
| 1215 | <a href="git-format-patch.html">git-format-patch(1)</a> to prepare and send suggested |
| 1216 | alternative to contributors. |
| 1217 | </p> |
| 1218 | </li> |
| 1219 | <li> |
| 1220 | <p> |
| 1221 | <a href="git-revert.html">git-revert(1)</a> to undo botched commits. |
| 1222 | </p> |
| 1223 | </li> |
| 1224 | <li> |
| 1225 | <p> |
| 1226 | <a href="git-push.html">git-push(1)</a> to publish the bleeding edge. |
| 1227 | </p> |
| 1228 | </li> |
| 1229 | </ul></div> |
| 1230 | <div class="sect2"> |
| 1231 | <h3 id="_examples_3">Examples</h3> |
| 1232 | <div class="dlist"><dl> |
| 1233 | <dt class="hdlist1"> |
| 1234 | A typical integrator’s Git day. |
| 1235 | </dt> |
| 1236 | <dd> |
| 1237 | <div class="listingblock"> |
| 1238 | <div class="content"> |
| 1239 | <pre><code>$ git status <b><1></b> |
| 1240 | $ git branch --no-merged master <b><2></b> |
| 1241 | $ mailx <b><3></b> |
| 1242 | & s 2 3 4 5 ./+to-apply |
| 1243 | & s 7 8 ./+hold-linus |
| 1244 | & q |
| 1245 | $ git checkout -b topic/one master |
| 1246 | $ git am -3 -i -s ./+to-apply <b><4></b> |
| 1247 | $ compile/test |
| 1248 | $ git checkout -b hold/linus && git am -3 -i -s ./+hold-linus <b><5></b> |
| 1249 | $ git checkout topic/one && git rebase master <b><6></b> |
| 1250 | $ git checkout pu && git reset --hard next <b><7></b> |
| 1251 | $ git merge topic/one topic/two && git merge hold/linus <b><8></b> |
| 1252 | $ git checkout maint |
| 1253 | $ git cherry-pick master~4 <b><9></b> |
| 1254 | $ compile/test |
| 1255 | $ git tag -s -m "GIT 0.99.9x" v0.99.9x <b><10></b> |
| 1256 | $ git fetch ko && for branch in master maint next pu <b><11></b> |
| 1257 | do |
| 1258 | git show-branch ko/$branch $branch <b><12></b> |
| 1259 | done |
| 1260 | $ git push --follow-tags ko <b><13></b></code></pre> |
| 1261 | </div></div> |
| 1262 | <div class="colist arabic"><ol> |
| 1263 | <li> |
| 1264 | <p> |
| 1265 | see what you were in the middle of doing, if anything. |
| 1266 | </p> |
| 1267 | </li> |
| 1268 | <li> |
| 1269 | <p> |
| 1270 | see which branches haven’t been merged into <code>master</code> yet. |
| 1271 | Likewise for any other integration branches e.g. <code>maint</code>, <code>next</code> |
| 1272 | and <code>pu</code> (potential updates). |
| 1273 | </p> |
| 1274 | </li> |
| 1275 | <li> |
| 1276 | <p> |
| 1277 | read mails, save ones that are applicable, and save others |
| 1278 | that are not quite ready (other mail readers are available). |
| 1279 | </p> |
| 1280 | </li> |
| 1281 | <li> |
| 1282 | <p> |
| 1283 | apply them, interactively, with your sign-offs. |
| 1284 | </p> |
| 1285 | </li> |
| 1286 | <li> |
| 1287 | <p> |
| 1288 | create topic branch as needed and apply, again with sign-offs. |
| 1289 | </p> |
| 1290 | </li> |
| 1291 | <li> |
| 1292 | <p> |
| 1293 | rebase internal topic branch that has not been merged to the |
| 1294 | master or exposed as a part of a stable branch. |
| 1295 | </p> |
| 1296 | </li> |
| 1297 | <li> |
| 1298 | <p> |
| 1299 | restart <code>pu</code> every time from the next. |
| 1300 | </p> |
| 1301 | </li> |
| 1302 | <li> |
| 1303 | <p> |
| 1304 | and bundle topic branches still cooking. |
| 1305 | </p> |
| 1306 | </li> |
| 1307 | <li> |
| 1308 | <p> |
| 1309 | backport a critical fix. |
| 1310 | </p> |
| 1311 | </li> |
| 1312 | <li> |
| 1313 | <p> |
| 1314 | create a signed tag. |
| 1315 | </p> |
| 1316 | </li> |
| 1317 | <li> |
| 1318 | <p> |
| 1319 | make sure master was not accidentally rewound beyond that |
| 1320 | already pushed out. <code>ko</code> shorthand points at the Git maintainer’s |
| 1321 | repository at kernel.org, and looks like this: |
| 1322 | </p> |
| 1323 | <div class="listingblock"> |
| 1324 | <div class="content"> |
| 1325 | <pre><code>(in .git/config) |
| 1326 | [remote "ko"] |
| 1327 | url = kernel.org:/pub/scm/git/git.git |
| 1328 | fetch = refs/heads/*:refs/remotes/ko/* |
| 1329 | push = refs/heads/master |
| 1330 | push = refs/heads/next |
| 1331 | push = +refs/heads/pu |
| 1332 | push = refs/heads/maint</code></pre> |
| 1333 | </div></div> |
| 1334 | </li> |
| 1335 | <li> |
| 1336 | <p> |
| 1337 | In the output from <code>git show-branch</code>, <code>master</code> should have |
| 1338 | everything <code>ko/master</code> has, and <code>next</code> should have |
| 1339 | everything <code>ko/next</code> has, etc. |
| 1340 | </p> |
| 1341 | </li> |
| 1342 | <li> |
| 1343 | <p> |
| 1344 | push out the bleeding edge, together with new tags that point |
| 1345 | into the pushed history. |
| 1346 | </p> |
| 1347 | </li> |
| 1348 | </ol></div> |
| 1349 | </dd> |
| 1350 | </dl></div> |
| 1351 | </div> |
| 1352 | </div> |
| 1353 | </div> |
| 1354 | <div class="sect1"> |
| 1355 | <h2 id="_repository_administration_a_id_administration_a">Repository Administration<a id="ADMINISTRATION"></a></h2> |
| 1356 | <div class="sectionbody"> |
| 1357 | <div class="paragraph"><p>A repository administrator uses the following tools to set up |
| 1358 | and maintain access to the repository by developers.</p></div> |
| 1359 | <div class="ulist"><ul> |
| 1360 | <li> |
| 1361 | <p> |
| 1362 | <a href="git-daemon.html">git-daemon(1)</a> to allow anonymous download from |
| 1363 | repository. |
| 1364 | </p> |
| 1365 | </li> |
| 1366 | <li> |
| 1367 | <p> |
| 1368 | <a href="git-shell.html">git-shell(1)</a> can be used as a <em>restricted login shell</em> |
| 1369 | for shared central repository users. |
| 1370 | </p> |
| 1371 | </li> |
| 1372 | <li> |
| 1373 | <p> |
| 1374 | <a href="git-http-backend.html">git-http-backend(1)</a> provides a server side implementation |
| 1375 | of Git-over-HTTP ("Smart http") allowing both fetch and push services. |
| 1376 | </p> |
| 1377 | </li> |
| 1378 | <li> |
| 1379 | <p> |
| 1380 | <a href="gitweb.html">gitweb(1)</a> provides a web front-end to Git repositories, |
| 1381 | which can be set-up using the <a href="git-instaweb.html">git-instaweb(1)</a> script. |
| 1382 | </p> |
| 1383 | </li> |
| 1384 | </ul></div> |
| 1385 | <div class="paragraph"><p><a href="howto/update-hook-example.html">update hook howto</a> has a good |
| 1386 | example of managing a shared central repository.</p></div> |
| 1387 | <div class="paragraph"><p>In addition there are a number of other widely deployed hosting, browsing |
| 1388 | and reviewing solutions such as:</p></div> |
| 1389 | <div class="ulist"><ul> |
| 1390 | <li> |
| 1391 | <p> |
| 1392 | gitolite, gerrit code review, cgit and others. |
| 1393 | </p> |
| 1394 | </li> |
| 1395 | </ul></div> |
| 1396 | <div class="sect2"> |
| 1397 | <h3 id="_examples_4">Examples</h3> |
| 1398 | <div class="dlist"><dl> |
| 1399 | <dt class="hdlist1"> |
| 1400 | We assume the following in /etc/services |
| 1401 | </dt> |
| 1402 | <dd> |
| 1403 | <div class="listingblock"> |
| 1404 | <div class="content"> |
| 1405 | <pre><code>$ grep 9418 /etc/services |
| 1406 | git 9418/tcp # Git Version Control System</code></pre> |
| 1407 | </div></div> |
| 1408 | </dd> |
| 1409 | <dt class="hdlist1"> |
| 1410 | Run git-daemon to serve /pub/scm from inetd. |
| 1411 | </dt> |
| 1412 | <dd> |
| 1413 | <div class="listingblock"> |
| 1414 | <div class="content"> |
| 1415 | <pre><code>$ grep git /etc/inetd.conf |
| 1416 | git stream tcp nowait nobody \ |
| 1417 | /usr/bin/git-daemon git-daemon --inetd --export-all /pub/scm</code></pre> |
| 1418 | </div></div> |
| 1419 | <div class="paragraph"><p>The actual configuration line should be on one line.</p></div> |
| 1420 | </dd> |
| 1421 | <dt class="hdlist1"> |
| 1422 | Run git-daemon to serve /pub/scm from xinetd. |
| 1423 | </dt> |
| 1424 | <dd> |
| 1425 | <div class="listingblock"> |
| 1426 | <div class="content"> |
| 1427 | <pre><code>$ cat /etc/xinetd.d/git-daemon |
| 1428 | # default: off |
| 1429 | # description: The Git server offers access to Git repositories |
| 1430 | service git |
| 1431 | { |
| 1432 | disable = no |
| 1433 | type = UNLISTED |
| 1434 | port = 9418 |
| 1435 | socket_type = stream |
| 1436 | wait = no |
| 1437 | user = nobody |
| 1438 | server = /usr/bin/git-daemon |
| 1439 | server_args = --inetd --export-all --base-path=/pub/scm |
| 1440 | log_on_failure += USERID |
| 1441 | }</code></pre> |
| 1442 | </div></div> |
| 1443 | <div class="paragraph"><p>Check your xinetd(8) documentation and setup, this is from a Fedora system. |
| 1444 | Others might be different.</p></div> |
| 1445 | </dd> |
| 1446 | <dt class="hdlist1"> |
| 1447 | Give push/pull only access to developers using git-over-ssh. |
| 1448 | </dt> |
| 1449 | <dd> |
| 1450 | <p> |
| 1451 | e.g. those using: |
| 1452 | <code>$ git push/pull ssh://host.xz/pub/scm/project</code> |
| 1453 | </p> |
| 1454 | <div class="listingblock"> |
| 1455 | <div class="content"> |
| 1456 | <pre><code>$ grep git /etc/passwd <b><1></b> |
| 1457 | alice:x:1000:1000::/home/alice:/usr/bin/git-shell |
| 1458 | bob:x:1001:1001::/home/bob:/usr/bin/git-shell |
| 1459 | cindy:x:1002:1002::/home/cindy:/usr/bin/git-shell |
| 1460 | david:x:1003:1003::/home/david:/usr/bin/git-shell |
| 1461 | $ grep git /etc/shells <b><2></b> |
| 1462 | /usr/bin/git-shell</code></pre> |
| 1463 | </div></div> |
| 1464 | <div class="colist arabic"><ol> |
| 1465 | <li> |
| 1466 | <p> |
| 1467 | log-in shell is set to /usr/bin/git-shell, which does not |
| 1468 | allow anything but <code>git push</code> and <code>git pull</code>. The users require |
| 1469 | ssh access to the machine. |
| 1470 | </p> |
| 1471 | </li> |
| 1472 | <li> |
| 1473 | <p> |
| 1474 | in many distributions /etc/shells needs to list what is used |
| 1475 | as the login shell. |
| 1476 | </p> |
| 1477 | </li> |
| 1478 | </ol></div> |
| 1479 | </dd> |
| 1480 | <dt class="hdlist1"> |
| 1481 | CVS-style shared repository. |
| 1482 | </dt> |
| 1483 | <dd> |
| 1484 | <div class="listingblock"> |
| 1485 | <div class="content"> |
| 1486 | <pre><code>$ grep git /etc/group <b><1></b> |
| 1487 | git:x:9418:alice,bob,cindy,david |
| 1488 | $ cd /home/devo.git |
| 1489 | $ ls -l <b><2></b> |
| 1490 | lrwxrwxrwx 1 david git 17 Dec 4 22:40 HEAD -> refs/heads/master |
| 1491 | drwxrwsr-x 2 david git 4096 Dec 4 22:40 branches |
| 1492 | -rw-rw-r-- 1 david git 84 Dec 4 22:40 config |
| 1493 | -rw-rw-r-- 1 david git 58 Dec 4 22:40 description |
| 1494 | drwxrwsr-x 2 david git 4096 Dec 4 22:40 hooks |
| 1495 | -rw-rw-r-- 1 david git 37504 Dec 4 22:40 index |
| 1496 | drwxrwsr-x 2 david git 4096 Dec 4 22:40 info |
| 1497 | drwxrwsr-x 4 david git 4096 Dec 4 22:40 objects |
| 1498 | drwxrwsr-x 4 david git 4096 Nov 7 14:58 refs |
| 1499 | drwxrwsr-x 2 david git 4096 Dec 4 22:40 remotes |
| 1500 | $ ls -l hooks/update <b><3></b> |
| 1501 | -r-xr-xr-x 1 david git 3536 Dec 4 22:40 update |
| 1502 | $ cat info/allowed-users <b><4></b> |
| 1503 | refs/heads/master alice\|cindy |
| 1504 | refs/heads/doc-update bob |
| 1505 | refs/tags/v[0-9]* david</code></pre> |
| 1506 | </div></div> |
| 1507 | <div class="colist arabic"><ol> |
| 1508 | <li> |
| 1509 | <p> |
| 1510 | place the developers into the same git group. |
| 1511 | </p> |
| 1512 | </li> |
| 1513 | <li> |
| 1514 | <p> |
| 1515 | and make the shared repository writable by the group. |
| 1516 | </p> |
| 1517 | </li> |
| 1518 | <li> |
| 1519 | <p> |
| 1520 | use update-hook example by Carl from Documentation/howto/ |
| 1521 | for branch policy control. |
| 1522 | </p> |
| 1523 | </li> |
| 1524 | <li> |
| 1525 | <p> |
| 1526 | alice and cindy can push into master, only bob can push into doc-update. |
| 1527 | david is the release manager and is the only person who can |
| 1528 | create and push version tags. |
| 1529 | </p> |
| 1530 | </li> |
| 1531 | </ol></div> |
| 1532 | </dd> |
| 1533 | </dl></div> |
| 1534 | </div> |
| 1535 | </div> |
| 1536 | </div> |
| 1537 | <div class="sect1"> |
| 1538 | <h2 id="_git">GIT</h2> |
| 1539 | <div class="sectionbody"> |
| 1540 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
| 1541 | </div> |
| 1542 | </div> |
| 1543 | </div> |
| 1544 | <div id="footnotes"><hr /></div> |
| 1545 | <div id="footer"> |
| 1546 | <div id="footer-text"> |
Junio C Hamano | d30e7ef | 2015-12-10 22:27:17 | [diff] [blame] | 1547 | Last updated 2015-10-29 14:44:28 PDT |
Junio C Hamano | 446e30b | 2014-10-16 21:30:32 | [diff] [blame] | 1548 | </div> |
| 1549 | </div> |
| 1550 | </body> |
| 1551 | </html> |