blob: 1e468167ef3ac53fc53b192201b82e3655dc9c30 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231<!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>
Junio C Hamano9d971152012-12-19 00:43:115<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6<meta name="generator" content="AsciiDoc 8.6.8" />
Junio C Hamano60186642010-12-02 14:18:267<title>git-commit(1)</title>
Junio C Hamano1a4e8412005-12-27 08:17:238<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:119/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
10
11/* Default font. */
12body {
13 font-family: Georgia,serif;
14}
15
16/* Title font. */
17h1, h2, h3, h4, h5, h6,
18div.title, caption.title,
19thead, p.table.header,
20#toctitle,
21#author, #revnumber, #revdate, #revremark,
22#footer {
23 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano1a4e8412005-12-27 08:17:2324}
25
26body {
27 margin: 1em 5% 1em 5%;
28}
29
Junio C Hamanoba4b9282008-07-06 05:20:3130a {
31 color: blue;
32 text-decoration: underline;
33}
34a:visited {
35 color: fuchsia;
36}
Junio C Hamano1a4e8412005-12-27 08:17:2337
38em {
39 font-style: italic;
Junio C Hamano60186642010-12-02 14:18:2640 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2341}
42
43strong {
44 font-weight: bold;
Junio C Hamano60186642010-12-02 14:18:2645 color: #083194;
Junio C Hamano1a4e8412005-12-27 08:17:2346}
47
Junio C Hamano1a4e8412005-12-27 08:17:2348h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:2350 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
53}
54
Junio C Hamanoba4b9282008-07-06 05:20:3155h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2356 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2359 padding-top: 0.5em;
60}
Junio C Hamanoba4b9282008-07-06 05:20:3161h3 {
62 float: left;
63}
64h3 + * {
65 clear: left;
66}
Junio C Hamano9d971152012-12-19 00:43:1167h5 {
68 font-size: 1.0em;
69}
Junio C Hamano1a4e8412005-12-27 08:17:2370
71div.sectionbody {
Junio C Hamano1a4e8412005-12-27 08:17:2372 margin-left: 0;
73}
74
75hr {
76 border: 1px solid silver;
77}
78
79p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
82}
83
Junio C Hamano60186642010-12-02 14:18:2684ul, ol, li > p {
85 margin-top: 0;
86}
Junio C Hamano9d971152012-12-19 00:43:1187ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano60186642010-12-02 14:18:2689
Junio C Hamano9d971152012-12-19 00:43:1190.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2394 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamano1a4e8412005-12-27 08:17:23100 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamano1a4e8412005-12-27 08:17:23105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23110 font-size: small;
111 border-top: 2px solid silver;
112 padding-top: 0.5em;
113 margin-top: 4.0em;
114}
Junio C Hamano9d971152012-12-19 00:43:11115#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9d971152012-12-19 00:43:11124#preamble {
Junio C Hamano60186642010-12-02 14:18:26125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
127}
Junio C Hamano9d971152012-12-19 00:43:11128div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23132 margin-bottom: 1.5em;
133}
134div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22135 margin-top: 2.0em;
136 margin-bottom: 2.0em;
137 margin-right: 10%;
138 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano60186642010-12-02 14:18:26147 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23148 font-weight: bold;
149 text-align: left;
150 margin-top: 1.0em;
151 margin-bottom: 0.5em;
152}
153div.title + * {
154 margin-top: 0;
155}
156
157td div.title:first-child {
158 margin-top: 0.0em;
159}
160div.content div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content + div.title {
164 margin-top: 0.0em;
165}
166
167div.sidebarblock > div.content {
168 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11169 border: 1px solid #dddddd;
170 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23171 padding: 0.5em;
172}
173
174div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11175 border: 1px solid #dddddd;
176 border-left: 5px solid #f0f0f0;
177 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23178 padding: 0.5em;
179}
180
Junio C Hamano7bd050f2011-09-22 06:32:22181div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
Junio C Hamano60186642010-12-02 14:18:26184 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano60186642010-12-02 14:18:26189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23191 text-align: right;
192}
Junio C Hamano60186642010-12-02 14:18:26193
Junio C Hamano9d971152012-12-19 00:43:11194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano60186642010-12-02 14:18:26197}
198div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
201}
202/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31203div.verseblock + div.attribution {
204 text-align: left;
205}
Junio C Hamano1a4e8412005-12-27 08:17:23206
207div.admonitionblock .icon {
208 vertical-align: top;
209 font-size: 1.1em;
210 font-weight: bold;
211 text-decoration: underline;
212 color: #527bbd;
213 padding-right: 0.5em;
214}
215div.admonitionblock td.content {
216 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23218}
219
220div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22221 border-left: 3px solid #dddddd;
222 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23223}
224
Junio C Hamano1a4e8412005-12-27 08:17:23225div.imageblock div.content { padding-left: 0; }
Junio C Hamano1a4e8412005-12-27 08:17:23226span.image img { border-style: none; }
Junio C Hamano60186642010-12-02 14:18:26227a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano60186642010-12-02 14:18:26236 font-style: normal;
237 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23238}
239dd > *:first-child {
Junio C Hamano60186642010-12-02 14:18:26240 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano60186642010-12-02 14:18:26246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23250 list-style-type: lower-alpha;
251}
Junio C Hamano60186642010-12-02 14:18:26252ol.upperalpha {
253 list-style-type: upper-alpha;
254}
255ol.lowerroman {
256 list-style-type: lower-roman;
257}
258ol.upperroman {
259 list-style-type: upper-roman;
260}
261
262div.compact ul, div.compact ol,
263div.compact p, div.compact p,
264div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
267}
Junio C Hamano1a4e8412005-12-27 08:17:23268
Junio C Hamano1a4e8412005-12-27 08:17:23269tfoot {
270 font-weight: bold;
271}
Junio C Hamano60186642010-12-02 14:18:26272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano60186642010-12-02 14:18:26275
276div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano60186642010-12-02 14:18:26280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamano60186642010-12-02 14:18:26283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23287 vertical-align: top;
Junio C Hamano60186642010-12-02 14:18:26288 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23289 padding-right: 0.8em;
Junio C Hamano60186642010-12-02 14:18:26290 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23291}
Junio C Hamano60186642010-12-02 14:18:26292td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23293 vertical-align: top;
294}
Junio C Hamano60186642010-12-02 14:18:26295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamano1a4e8412005-12-27 08:17:23303
Junio C Hamano7bd050f2011-09-22 06:32:22304.footnote, .footnoteref {
305 font-size: 0.8em;
306}
307
308span.footnote, span.footnoteref {
309 vertical-align: super;
310}
311
312#footnotes {
313 margin: 20px 0 20px 0;
314 padding: 7px 0 0 0;
315}
316
317#footnotes div.footnote {
318 margin: 0 0 5px 0;
319}
320
321#footnotes hr {
322 border: none;
323 border-top: 1px solid silver;
324 height: 1px;
325 text-align: left;
326 margin-left: 0;
327 width: 20%;
328 min-width: 100px;
329}
330
Junio C Hamano9d971152012-12-19 00:43:11331div.colist td {
332 padding-right: 0.5em;
333 padding-bottom: 0.3em;
334 vertical-align: top;
335}
336div.colist td img {
337 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23338}
Junio C Hamanoba4b9282008-07-06 05:20:31339
Junio C Hamano9d971152012-12-19 00:43:11340@media print {
341 #footer-badges { display: none; }
342}
343
344#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22345 margin-bottom: 2.5em;
346}
347
Junio C Hamano9d971152012-12-19 00:43:11348#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31349 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
354}
355
Junio C Hamano9d971152012-12-19 00:43:11356div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31357 margin-top: 0;
358 margin-bottom: 0;
359}
360div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
363}
364div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
367}
368div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
371}
Junio C Hamano9d971152012-12-19 00:43:11372
373span.aqua { color: aqua; }
374span.black { color: black; }
375span.blue { color: blue; }
376span.fuchsia { color: fuchsia; }
377span.gray { color: gray; }
378span.green { color: green; }
379span.lime { color: lime; }
380span.maroon { color: maroon; }
381span.navy { color: navy; }
382span.olive { color: olive; }
383span.purple { color: purple; }
384span.red { color: red; }
385span.silver { color: silver; }
386span.teal { color: teal; }
387span.white { color: white; }
388span.yellow { color: yellow; }
389
390span.aqua-background { background: aqua; }
391span.black-background { background: black; }
392span.blue-background { background: blue; }
393span.fuchsia-background { background: fuchsia; }
394span.gray-background { background: gray; }
395span.green-background { background: green; }
396span.lime-background { background: lime; }
397span.maroon-background { background: maroon; }
398span.navy-background { background: navy; }
399span.olive-background { background: olive; }
400span.purple-background { background: purple; }
401span.red-background { background: red; }
402span.silver-background { background: silver; }
403span.teal-background { background: teal; }
404span.white-background { background: white; }
405span.yellow-background { background: yellow; }
406
407span.big { font-size: 2em; }
408span.small { font-size: 0.6em; }
409
410span.underline { text-decoration: underline; }
411span.overline { text-decoration: overline; }
412span.line-through { text-decoration: line-through; }
413
414div.unbreakable { page-break-inside: avoid; }
415
416
417/*
418 * xhtml11 specific
419 *
420 * */
421
422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
455table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
458}
459thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
462}
463p.tableblock {
464 margin-top: 0;
465}
466table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
472}
473th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
478}
479
480table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
483}
484table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
487}
488table.tableblock.frame-none {
489 border-style: hidden;
490}
491
492th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
494}
495th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
497}
498th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
500}
501
502th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
504}
505th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
507}
508th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
510}
511
512
513/*
514 * manpage specific
515 *
516 * */
517
518body.manpage h1 {
Junio C Hamano60186642010-12-02 14:18:26519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
523}
Junio C Hamano9d971152012-12-19 00:43:11524body.manpage h2 {
Junio C Hamano60186642010-12-02 14:18:26525 border-style: none;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano60186642010-12-02 14:18:26529}
530
531@media print {
Junio C Hamano9d971152012-12-19 00:43:11532 body.manpage div#toc { display: none; }
Junio C Hamano60186642010-12-02 14:18:26533}
534
Junio C Hamano1a4e8412005-12-27 08:17:23535
Junio C Hamano1a4e8412005-12-27 08:17:23536</style>
Junio C Hamano7bd050f2011-09-22 06:32:22537<script type="text/javascript">
538/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22539var asciidoc = { // Namespace.
540
541/////////////////////////////////////////////////////////////////////
542// Table Of Contents generator
543/////////////////////////////////////////////////////////////////////
544
545/* Author: Mihai Bazon, September 2002
546 * http://students.infoiasi.ro/~mishoo
547 *
548 * Table Of Content generator
549 * Version: 0.4
550 *
551 * Feel free to use this script under the terms of the GNU General Public
552 * License, as long as you do not remove or alter this notice.
553 */
554
555 /* modified by Troy D. Hanson, September 2006. License: GPL */
556 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
557
558// toclevels = 1..4.
559toc: function (toclevels) {
560
561 function getText(el) {
562 var text = "";
563 for (var i = el.firstChild; i != null; i = i.nextSibling) {
564 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565 text += i.data;
566 else if (i.firstChild != null)
567 text += getText(i);
568 }
569 return text;
570 }
571
572 function TocEntry(el, text, toclevel) {
573 this.element = el;
574 this.text = text;
575 this.toclevel = toclevel;
576 }
577
578 function tocEntries(el, toclevels) {
579 var result = new Array;
Junio C Hamano9d971152012-12-19 00:43:11580 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22581 // Function that scans the DOM tree for header elements (the DOM2
582 // nodeIterator API would be a better technique but not supported by all
583 // browsers).
584 var iterate = function (el) {
585 for (var i = el.firstChild; i != null; i = i.nextSibling) {
586 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587 var mo = re.exec(i.tagName);
588 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
590 }
591 iterate(i);
592 }
593 }
594 }
595 iterate(el);
596 return result;
597 }
598
599 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11600 if (!toc) {
601 return;
602 }
603
604 // Delete existing TOC entries in case we're reloading the TOC.
605 var tocEntriesToRemove = [];
606 var i;
607 for (i = 0; i < toc.childNodes.length; i++) {
608 var entry = toc.childNodes[i];
609 if (entry.nodeName.toLowerCase() == 'div'
610 && entry.getAttribute("class")
611 && entry.getAttribute("class").match(/^toclevel/))
612 tocEntriesToRemove.push(entry);
613 }
614 for (i = 0; i < tocEntriesToRemove.length; i++) {
615 toc.removeChild(tocEntriesToRemove[i]);
616 }
617
618 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22619 var entries = tocEntries(document.getElementById("content"), toclevels);
620 for (var i = 0; i < entries.length; ++i) {
621 var entry = entries[i];
622 if (entry.element.id == "")
623 entry.element.id = "_toc_" + i;
624 var a = document.createElement("a");
625 a.href = "#" + entry.element.id;
626 a.appendChild(document.createTextNode(entry.text));
627 var div = document.createElement("div");
628 div.appendChild(a);
629 div.className = "toclevel" + entry.toclevel;
630 toc.appendChild(div);
631 }
632 if (entries.length == 0)
633 toc.parentNode.removeChild(toc);
634},
635
636
637/////////////////////////////////////////////////////////////////////
638// Footnotes generator
639/////////////////////////////////////////////////////////////////////
640
641/* Based on footnote generation code from:
642 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
643 */
644
645footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11646 // Delete existing footnote entries in case we're reloading the footnodes.
647 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22648 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11649 if (!noteholder) {
650 return;
651 }
652 var entriesToRemove = [];
653 for (i = 0; i < noteholder.childNodes.length; i++) {
654 var entry = noteholder.childNodes[i];
655 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656 entriesToRemove.push(entry);
657 }
658 for (i = 0; i < entriesToRemove.length; i++) {
659 noteholder.removeChild(entriesToRemove[i]);
660 }
661
662 // Rebuild footnote entries.
663 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22664 var spans = cont.getElementsByTagName("span");
665 var refs = {};
666 var n = 0;
667 for (i=0; i<spans.length; i++) {
668 if (spans[i].className == "footnote") {
669 n++;
Junio C Hamano9d971152012-12-19 00:43:11670 var note = spans[i].getAttribute("data-note");
671 if (!note) {
672 // Use [\s\S] in place of . so multi-line matches work.
673 // Because JavaScript has no s (dotall) regex flag.
674 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675 spans[i].innerHTML =
676 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677 "' title='View footnote' class='footnote'>" + n + "</a>]";
678 spans[i].setAttribute("data-note", note);
679 }
Junio C Hamano7bd050f2011-09-22 06:32:22680 noteholder.innerHTML +=
681 "<div class='footnote' id='_footnote_" + n + "'>" +
682 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22684 var id =spans[i].getAttribute("id");
685 if (id != null) refs["#"+id] = n;
686 }
687 }
688 if (n == 0)
689 noteholder.parentNode.removeChild(noteholder);
690 else {
691 // Process footnoterefs.
692 for (i=0; i<spans.length; i++) {
693 if (spans[i].className == "footnoteref") {
694 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695 href = href.match(/#.*/)[0]; // Because IE return full URL.
696 n = refs[href];
697 spans[i].innerHTML =
698 "[<a href='#_footnote_" + n +
699 "' title='View footnote' class='footnote'>" + n + "</a>]";
700 }
701 }
702 }
Junio C Hamano9d971152012-12-19 00:43:11703},
704
705install: function(toclevels) {
706 var timerId;
707
708 function reinstall() {
709 asciidoc.footnotes();
710 if (toclevels) {
711 asciidoc.toc(toclevels);
712 }
713 }
714
715 function reinstallAndRemoveTimer() {
716 clearInterval(timerId);
717 reinstall();
718 }
719
720 timerId = setInterval(reinstall, 500);
721 if (document.addEventListener)
722 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723 else
724 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22725}
726
727}
Junio C Hamano9d971152012-12-19 00:43:11728asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22729/*]]>*/
730</script>
Junio C Hamano1a4e8412005-12-27 08:17:23731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23733<div id="header">
734<h1>
735git-commit(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-commit -
Junio C Hamano7c73c662007-01-19 00:37:50740 Record changes to the repository
Junio C Hamano1a4e8412005-12-27 08:17:23741</p>
742</div>
743</div>
Junio C Hamano7bd050f2011-09-22 06:32:22744<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11745<div class="sect1">
Junio C Hamano60186642010-12-02 14:18:26746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23747<div class="sectionbody">
Junio C Hamano235a91e2006-01-07 01:13:58748<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11749<pre class="content"><em>git commit</em> [-a | --interactive | --patch] [-s] [-v] [-u&lt;mode&gt;] [--amend]
Junio C Hamano3d050d62011-05-17 06:43:34750 [--dry-run] [(-c | -C | --fixup | --squash) &lt;commit&gt;]
751 [-F &lt;file&gt; | -m &lt;msg&gt;] [--reset-author] [--allow-empty]
752 [--allow-empty-message] [--no-verify] [-e] [--author=&lt;author&gt;]
753 [--date=&lt;date&gt;] [--cleanup=&lt;mode&gt;] [--status | --no-status]
Junio C Hamano9d971152012-12-19 00:43:11754 [-i | -o] [-S[&lt;keyid&gt;]] [--] [&lt;file&gt;&#8230;]</pre>
755<div class="attribution">
Junio C Hamano60186642010-12-02 14:18:26756</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23757</div>
Junio C Hamano9d971152012-12-19 00:43:11758</div>
759<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31760<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23761<div class="sectionbody">
Junio C Hamano60186642010-12-02 14:18:26762<div class="paragraph"><p>Stores the current contents of the index in a new commit along
Junio C Hamanoba4b9282008-07-06 05:20:31763with a log message from the user describing the changes.</p></div>
Junio C Hamano60186642010-12-02 14:18:26764<div class="paragraph"><p>The content to be added can be specified in several ways:</p></div>
765<div class="olist arabic"><ol class="arabic">
Junio C Hamanoe7935c42006-12-13 21:32:17766<li>
767<p>
Junio C Hamano1aa40d22010-01-21 17:46:43768by using <em>git add</em> to incrementally "add" changes to the
Junio C Hamanob515b6a2007-08-08 09:21:16769 index before using the <em>commit</em> command (Note: even modified
770 files must be "added");
771</p>
772</li>
773<li>
774<p>
Junio C Hamano1aa40d22010-01-21 17:46:43775by using <em>git rm</em> to remove files from the working tree
Junio C Hamanobd2b4bb2007-08-06 06:42:24776 and the index, again before using the <em>commit</em> command;
Junio C Hamanoe7935c42006-12-13 21:32:17777</p>
778</li>
779<li>
780<p>
Junio C Hamanobd2b4bb2007-08-06 06:42:24781by listing files as arguments to the <em>commit</em> command, in which
782 case the commit will ignore changes staged in the index, and instead
Junio C Hamano50819852008-11-19 02:07:56783 record the current content of the listed files (which must already
784 be known to git);
Junio C Hamanoe7935c42006-12-13 21:32:17785</p>
786</li>
787<li>
788<p>
Junio C Hamanobd2b4bb2007-08-06 06:42:24789by using the -a switch with the <em>commit</em> command to automatically
790 "add" changes from all known files (i.e. all files that are already
791 listed in the index) and to automatically "rm" files in the index
792 that have been removed from the working tree, and then perform the
793 actual commit;
Junio C Hamanoe7935c42006-12-13 21:32:17794</p>
795</li>
Junio C Hamanoc51fede2007-03-12 07:29:20796<li>
797<p>
Junio C Hamano3d050d62011-05-17 06:43:34798by using the --interactive or --patch switches with the <em>commit</em> command
799 to decide one by one which files or hunks should be part of the commit,
Junio C Hamanob76a6862012-05-02 22:02:46800 before finalizing the operation. See the &#8220;Interactive Mode&#8221; section of
Junio C Hamanoa28a9202012-06-21 07:08:23801 <a href="git-add.html">git-add(1)</a> to learn how to operate these modes.
Junio C Hamanoc51fede2007-03-12 07:29:20802</p>
803</li>
Junio C Hamanoba4b9282008-07-06 05:20:31804</ol></div>
Junio C Hamano9d971152012-12-19 00:43:11805<div class="paragraph"><p>The <code>--dry-run</code> option can be used to obtain a
Junio C Hamanoe7935c42006-12-13 21:32:17806summary of what is included by any of the above for the next
Junio C Hamano1bb31992009-08-29 04:24:08807commit by giving the same set of parameters (options and paths).</p></div>
Junio C Hamano60186642010-12-02 14:18:26808<div class="paragraph"><p>If you make a commit and then find a mistake immediately after
Junio C Hamano1aa40d22010-01-21 17:46:43809that, you can recover from it with <em>git reset</em>.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23810</div>
Junio C Hamano9d971152012-12-19 00:43:11811</div>
812<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31813<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23814<div class="sectionbody">
Junio C Hamano60186642010-12-02 14:18:26815<div class="dlist"><dl>
816<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47817-a
818</dt>
Junio C Hamano60186642010-12-02 14:18:26819<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47820--all
Junio C Hamano1a4e8412005-12-27 08:17:23821</dt>
822<dd>
823<p>
Junio C Hamanoe7935c42006-12-13 21:32:17824 Tell the command to automatically stage files that have
825 been modified and deleted, but new files you have not
826 told git about are not affected.
Junio C Hamano1a4e8412005-12-27 08:17:23827</p>
828</dd>
Junio C Hamano60186642010-12-02 14:18:26829<dt class="hdlist1">
Junio C Hamano3d050d62011-05-17 06:43:34830-p
831</dt>
832<dt class="hdlist1">
833--patch
834</dt>
835<dd>
836<p>
837 Use the interactive patch selection interface to chose
Junio C Hamanoa28a9202012-06-21 07:08:23838 which changes to commit. See <a href="git-add.html">git-add(1)</a> for
Junio C Hamano3d050d62011-05-17 06:43:34839 details.
840</p>
841</dd>
842<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47843-C &lt;commit&gt;
844</dt>
Junio C Hamano60186642010-12-02 14:18:26845<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47846--reuse-message=&lt;commit&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23847</dt>
848<dd>
849<p>
Junio C Hamanoeb415992008-06-08 22:49:47850 Take an existing commit object, and reuse the log message
Junio C Hamano1a4e8412005-12-27 08:17:23851 and the authorship information (including the timestamp)
Junio C Hamanoeb415992008-06-08 22:49:47852 when creating the commit.
853</p>
854</dd>
Junio C Hamano60186642010-12-02 14:18:26855<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47856-c &lt;commit&gt;
857</dt>
Junio C Hamano60186642010-12-02 14:18:26858<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47859--reedit-message=&lt;commit&gt;
860</dt>
861<dd>
862<p>
863 Like <em>-C</em>, but with <em>-c</em> the editor is invoked, so that
864 the user can further edit the commit message.
Junio C Hamano1a4e8412005-12-27 08:17:23865</p>
866</dd>
Junio C Hamano60186642010-12-02 14:18:26867<dt class="hdlist1">
Junio C Hamano2e6ded82010-12-05 06:20:48868--fixup=&lt;commit&gt;
869</dt>
870<dd>
871<p>
Junio C Hamano9d971152012-12-19 00:43:11872 Construct a commit message for use with <code>rebase --autosquash</code>.
Junio C Hamano2e6ded82010-12-05 06:20:48873 The commit message will be the subject line from the specified
Junio C Hamanoa28a9202012-06-21 07:08:23874 commit with a prefix of "fixup! ". See <a href="git-rebase.html">git-rebase(1)</a>
Junio C Hamano2e6ded82010-12-05 06:20:48875 for details.
876</p>
877</dd>
878<dt class="hdlist1">
879--squash=&lt;commit&gt;
880</dt>
881<dd>
882<p>
Junio C Hamano9d971152012-12-19 00:43:11883 Construct a commit message for use with <code>rebase --autosquash</code>.
Junio C Hamano2e6ded82010-12-05 06:20:48884 The commit message subject line is taken from the specified
885 commit with a prefix of "squash! ". Can be used with additional
Junio C Hamano9d971152012-12-19 00:43:11886 commit message options (<code>-m</code>/<code>-c</code>/<code>-C</code>/<code>-F</code>). See
Junio C Hamanoa28a9202012-06-21 07:08:23887 <a href="git-rebase.html">git-rebase(1)</a> for details.
Junio C Hamano2e6ded82010-12-05 06:20:48888</p>
889</dd>
890<dt class="hdlist1">
Junio C Hamano2bd8a742009-12-01 21:16:59891--reset-author
892</dt>
893<dd>
894<p>
Junio C Hamanoa8cc1d82011-03-10 01:18:12895 When used with -C/-c/--amend options, or when committing after a
896 a conflicting cherry-pick, declare that the authorship of the
897 resulting commit now belongs of the committer. This also renews
898 the author timestamp.
Junio C Hamano2bd8a742009-12-01 21:16:59899</p>
900</dd>
Junio C Hamano60186642010-12-02 14:18:26901<dt class="hdlist1">
Junio C Hamanoa0fae262009-12-28 09:33:50902--short
903</dt>
904<dd>
905<p>
906 When doing a dry-run, give the output in the short-format. See
Junio C Hamano9d971152012-12-19 00:43:11907 <a href="git-status.html">git-status(1)</a> for details. Implies <code>--dry-run</code>.
Junio C Hamanoa0fae262009-12-28 09:33:50908</p>
909</dd>
Junio C Hamano60186642010-12-02 14:18:26910<dt class="hdlist1">
Junio C Hamano9257a332012-06-25 20:01:02911--branch
912</dt>
913<dd>
914<p>
915 Show the branch and tracking info even in short-format.
916</p>
917</dd>
918<dt class="hdlist1">
Junio C Hamanoa0fae262009-12-28 09:33:50919--porcelain
920</dt>
921<dd>
922<p>
923 When doing a dry-run, give the output in a porcelain-ready
Junio C Hamanoa28a9202012-06-21 07:08:23924 format. See <a href="git-status.html">git-status(1)</a> for details. Implies
Junio C Hamano9d971152012-12-19 00:43:11925 <code>--dry-run</code>.
Junio C Hamanoa0fae262009-12-28 09:33:50926</p>
927</dd>
Junio C Hamano60186642010-12-02 14:18:26928<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:04929--long
930</dt>
931<dd>
932<p>
933 When doing a dry-run, give the output in a the long-format.
Junio C Hamano9d971152012-12-19 00:43:11934 Implies <code>--dry-run</code>.
Junio C Hamanoa1295452012-11-13 22:32:04935</p>
936</dd>
937<dt class="hdlist1">
Junio C Hamanoa0fae262009-12-28 09:33:50938-z
939</dt>
Junio C Hamano9257a332012-06-25 20:01:02940<dt class="hdlist1">
941--null
942</dt>
Junio C Hamanoa0fae262009-12-28 09:33:50943<dd>
944<p>
Junio C Hamano9d971152012-12-19 00:43:11945 When showing <code>short</code> or <code>porcelain</code> status output, terminate
Junio C Hamanoa0fae262009-12-28 09:33:50946 entries in the status output with NUL, instead of LF. If no
Junio C Hamano9d971152012-12-19 00:43:11947 format is given, implies the <code>--porcelain</code> output format.
Junio C Hamanoa0fae262009-12-28 09:33:50948</p>
949</dd>
Junio C Hamano60186642010-12-02 14:18:26950<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:23951-F &lt;file&gt;
952</dt>
Junio C Hamano60186642010-12-02 14:18:26953<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47954--file=&lt;file&gt;
955</dt>
Junio C Hamano1a4e8412005-12-27 08:17:23956<dd>
957<p>
958 Take the commit message from the given file. Use <em>-</em> to
959 read the message from the standard input.
960</p>
961</dd>
Junio C Hamano60186642010-12-02 14:18:26962<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47963--author=&lt;author&gt;
Junio C Hamano40f2f8d2006-02-07 08:04:39964</dt>
965<dd>
966<p>
Junio C Hamano13002fb2010-06-08 05:53:58967 Override the commit author. Specify an explicit author using the
Junio C Hamano9d971152012-12-19 00:43:11968 standard <code>A U Thor &lt;author@example.com&gt;</code> format. Otherwise &lt;author&gt;
Junio C Hamano13002fb2010-06-08 05:53:58969 is assumed to be a pattern and is used to search for an existing
970 commit by that author (i.e. rev-list --all -i --author=&lt;author&gt;);
971 the commit author is then copied from the first such commit found.
Junio C Hamano40f2f8d2006-02-07 08:04:39972</p>
973</dd>
Junio C Hamano60186642010-12-02 14:18:26974<dt class="hdlist1">
Junio C Hamanoae05fee2010-01-08 07:39:46975--date=&lt;date&gt;
976</dt>
977<dd>
978<p>
979 Override the author date used in the commit.
980</p>
981</dd>
Junio C Hamano60186642010-12-02 14:18:26982<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47983-m &lt;msg&gt;
984</dt>
Junio C Hamano60186642010-12-02 14:18:26985<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47986--message=&lt;msg&gt;
Junio C Hamano1a4e8412005-12-27 08:17:23987</dt>
988<dd>
989<p>
990 Use the given &lt;msg&gt; as the commit message.
991</p>
992</dd>
Junio C Hamano60186642010-12-02 14:18:26993<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47994-t &lt;file&gt;
995</dt>
Junio C Hamano60186642010-12-02 14:18:26996<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47997--template=&lt;file&gt;
Junio C Hamanoa3770f92007-07-25 08:53:33998</dt>
999<dd>
1000<p>
Junio C Hamano51f87de2012-04-16 21:18:541001 When editing the commit message, start the editor with the
Junio C Hamano9d971152012-12-19 00:43:111002 contents in the given file. The <code>commit.template</code> configuration
Junio C Hamano51f87de2012-04-16 21:18:541003 variable is often used to give this option implicitly to the
1004 command. This mechanism can be used by projects that want to
1005 guide participants with some hints on what to write in the message
1006 in what order. If the user exits the editor without editing the
1007 message, the commit is aborted. This has no effect when a message
Junio C Hamano9d971152012-12-19 00:43:111008 is given by other means, e.g. with the <code>-m</code> or <code>-F</code> options.
Junio C Hamanoa3770f92007-07-25 08:53:331009</p>
1010</dd>
Junio C Hamano60186642010-12-02 14:18:261011<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471012-s
1013</dt>
Junio C Hamano60186642010-12-02 14:18:261014<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471015--signoff
Junio C Hamano1a4e8412005-12-27 08:17:231016</dt>
1017<dd>
1018<p>
Junio C Hamano610d1762008-11-28 06:27:131019 Add Signed-off-by line by the committer at the end of the commit
Junio C Hamano7d06a8a2008-10-20 05:42:331020 log message.
Junio C Hamano1a4e8412005-12-27 08:17:231021</p>
1022</dd>
Junio C Hamano60186642010-12-02 14:18:261023<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471024-n
1025</dt>
Junio C Hamano60186642010-12-02 14:18:261026<dt class="hdlist1">
Junio C Hamanoe7935c42006-12-13 21:32:171027--no-verify
Junio C Hamano1a4e8412005-12-27 08:17:231028</dt>
1029<dd>
1030<p>
Junio C Hamano942b35e2007-12-09 10:19:331031 This option bypasses the pre-commit and commit-msg hooks.
Junio C Hamanoa28a9202012-06-21 07:08:231032 See also <a href="githooks.html">githooks(5)</a>.
Junio C Hamano1a4e8412005-12-27 08:17:231033</p>
1034</dd>
Junio C Hamano60186642010-12-02 14:18:261035<dt class="hdlist1">
Junio C Hamano0c999702007-12-03 09:57:551036--allow-empty
1037</dt>
1038<dd>
1039<p>
1040 Usually recording a commit that has the exact same tree as its
Junio C Hamano58256872007-12-04 08:31:131041 sole parent commit is a mistake, and the command prevents you
1042 from making such a commit. This option bypasses the safety, and
Junio C Hamano619596a2010-08-18 22:15:351043 is primarily for use by foreign SCM interface scripts.
Junio C Hamano0c999702007-12-03 09:57:551044</p>
1045</dd>
Junio C Hamano60186642010-12-02 14:18:261046<dt class="hdlist1">
Junio C Hamanocb39aea2010-05-09 07:24:481047--allow-empty-message
1048</dt>
1049<dd>
1050<p>
1051 Like --allow-empty this command is primarily for use by foreign
Junio C Hamano619596a2010-08-18 22:15:351052 SCM interface scripts. It allows you to create a commit with an
Junio C Hamanocb39aea2010-05-09 07:24:481053 empty commit message without using plumbing commands like
Junio C Hamanoa28a9202012-06-21 07:08:231054 <a href="git-commit-tree.html">git-commit-tree(1)</a>.
Junio C Hamanocb39aea2010-05-09 07:24:481055</p>
1056</dd>
Junio C Hamano60186642010-12-02 14:18:261057<dt class="hdlist1">
Junio C Hamano554da792007-12-27 03:29:581058--cleanup=&lt;mode&gt;
1059</dt>
1060<dd>
1061<p>
1062 This option sets how the commit message is cleaned up.
1063 The <em>&lt;mode&gt;</em> can be one of <em>verbatim</em>, <em>whitespace</em>, <em>strip</em>,
1064 and <em>default</em>. The <em>default</em> mode will strip leading and
1065 trailing empty lines and #commentary from the commit message
1066 only if the message is to be edited. Otherwise only whitespace
1067 removed. The <em>verbatim</em> mode does not change message at all,
1068 <em>whitespace</em> removes just leading/trailing whitespace lines
Junio C Hamanoce836cc2013-01-21 02:01:531069 and <em>strip</em> removes both whitespace and commentary. The default
1070 can be changed by the <em>commit.cleanup</em> configuration variable
1071 (see <a href="git-config.html">git-config(1)</a>).
Junio C Hamano554da792007-12-27 03:29:581072</p>
1073</dd>
Junio C Hamano60186642010-12-02 14:18:261074<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471075-e
1076</dt>
Junio C Hamano60186642010-12-02 14:18:261077<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471078--edit
Junio C Hamano1a4e8412005-12-27 08:17:231079</dt>
1080<dd>
1081<p>
Junio C Hamano9d971152012-12-19 00:43:111082 The message taken from file with <code>-F</code>, command line with
1083 <code>-m</code>, and from file with <code>-C</code> are usually used as the
Junio C Hamano1a4e8412005-12-27 08:17:231084 commit log message unmodified. This option lets you
1085 further edit the message taken from these sources.
1086</p>
1087</dd>
Junio C Hamano60186642010-12-02 14:18:261088<dt class="hdlist1">
Junio C Hamano4eb2b9c2012-11-15 21:12:291089--no-edit
1090</dt>
1091<dd>
1092<p>
1093 Use the selected commit message without launching an editor.
Junio C Hamano9d971152012-12-19 00:43:111094 For example, <code>git commit --amend --no-edit</code> amends a commit
Junio C Hamano4eb2b9c2012-11-15 21:12:291095 without changing its commit message.
1096</p>
1097</dd>
1098<dt class="hdlist1">
Junio C Hamanobfe9e752006-04-05 21:43:281099--amend
1100</dt>
1101<dd>
1102<p>
1103 Used to amend the tip of the current branch. Prepare the tree
1104 object you would want to replace the latest commit as usual
1105 (this includes the usual -i/-o and explicit paths), and the
1106 commit log editor is seeded with the commit message from the
1107 tip of the current branch. The commit you create replaces the
Junio C Hamano60186642010-12-02 14:18:261108 current tip&#8201;&#8212;&#8201;if it was a merge, it will have the parents of
1109 the current tip as parents&#8201;&#8212;&#8201;so the current top commit is
Junio C Hamanobfe9e752006-04-05 21:43:281110 discarded.
1111</p>
Junio C Hamano9d971152012-12-19 00:43:111112<div class="openblock">
1113<div class="content">
Junio C Hamano4eb2b9c2012-11-15 21:12:291114<div class="paragraph"><p>It is a rough equivalent for:</p></div>
1115<div class="listingblock">
1116<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111117<pre><code> $ git reset --soft HEAD^
Junio C Hamano4eb2b9c2012-11-15 21:12:291118 $ ... do something else to come up with the right tree ...
Junio C Hamano9d971152012-12-19 00:43:111119 $ git commit -c ORIG_HEAD</code></pre>
Junio C Hamano4eb2b9c2012-11-15 21:12:291120</div></div>
1121<div class="paragraph"><p>but can be used to amend a merge commit.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111122</div></div>
Junio C Hamano4eb2b9c2012-11-15 21:12:291123<div class="paragraph"><p>You should understand the implications of rewriting history if you
1124amend a commit that has already been published. (See the "RECOVERING
1125FROM UPSTREAM REBASE" section in <a href="git-rebase.html">git-rebase(1)</a>.)</p></div>
Junio C Hamano9257a332012-06-25 20:01:021126</dd>
1127<dt class="hdlist1">
1128--no-post-rewrite
1129</dt>
1130<dd>
1131<p>
1132 Bypass the post-rewrite hook.
1133</p>
1134</dd>
Junio C Hamano60186642010-12-02 14:18:261135<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471136-i
1137</dt>
Junio C Hamano60186642010-12-02 14:18:261138<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471139--include
Junio C Hamano40f2f8d2006-02-07 08:04:391140</dt>
1141<dd>
1142<p>
Junio C Hamanoe7935c42006-12-13 21:32:171143 Before making a commit out of staged contents so far,
1144 stage the contents of paths given on the command line
1145 as well. This is usually not what you want unless you
1146 are concluding a conflicted merge.
Junio C Hamano6697ac52006-02-14 08:00:231147</p>
1148</dd>
Junio C Hamano60186642010-12-02 14:18:261149<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471150-o
1151</dt>
Junio C Hamano60186642010-12-02 14:18:261152<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471153--only
Junio C Hamanoe79159d2008-04-12 08:23:171154</dt>
1155<dd>
1156<p>
1157 Make a commit only from the paths specified on the
1158 command line, disregarding any contents that have been
1159 staged so far. This is the default mode of operation of
Junio C Hamano1aa40d22010-01-21 17:46:431160 <em>git commit</em> if any paths are given on the command line,
Junio C Hamanoe79159d2008-04-12 08:23:171161 in which case this option can be omitted.
1162 If this option is specified together with <em>--amend</em>, then
Junio C Hamano54bf1e22008-12-20 06:30:111163 no paths need to be specified, which can be used to amend
Junio C Hamanoe79159d2008-04-12 08:23:171164 the last commit without committing changes that have
1165 already been staged.
1166</p>
1167</dd>
Junio C Hamano60186642010-12-02 14:18:261168<dt class="hdlist1">
Junio C Hamano4224f992008-06-23 07:14:081169-u[&lt;mode&gt;]
Junio C Hamanoeb415992008-06-08 22:49:471170</dt>
Junio C Hamano60186642010-12-02 14:18:261171<dt class="hdlist1">
Junio C Hamano4224f992008-06-23 07:14:081172--untracked-files[=&lt;mode&gt;]
Junio C Hamano1e6e0062007-07-13 05:33:251173</dt>
1174<dd>
1175<p>
Junio C Hamano36a4dbc2011-02-22 07:51:321176 Show untracked files.
Junio C Hamano1e6e0062007-07-13 05:33:251177</p>
Junio C Hamano36a4dbc2011-02-22 07:51:321178<div class="paragraph"><p>The mode parameter is optional (defaults to <em>all</em>), and is used to
1179specify the handling of untracked files; when -u is not used, the
1180default is <em>normal</em>, i.e. show untracked files and directories.</p></div>
Junio C Hamano60186642010-12-02 14:18:261181<div class="paragraph"><p>The possible options are:</p></div>
1182<div class="ulist"><ul>
Junio C Hamano4224f992008-06-23 07:14:081183<li>
1184<p>
1185<em>no</em> - Show no untracked files
1186</p>
1187</li>
1188<li>
1189<p>
1190<em>normal</em> - Shows untracked files and directories
1191</p>
1192</li>
1193<li>
1194<p>
1195<em>all</em> - Also shows individual files in untracked directories.
1196</p>
Junio C Hamano36a4dbc2011-02-22 07:51:321197<div class="paragraph"><p>The default can be changed using the status.showUntrackedFiles
Junio C Hamanoa28a9202012-06-21 07:08:231198configuration variable documented in <a href="git-config.html">git-config(1)</a>.</p></div>
Junio C Hamanoe1cca182010-02-20 20:01:231199</li>
1200</ul></div>
Junio C Hamano1e6e0062007-07-13 05:33:251201</dd>
Junio C Hamano60186642010-12-02 14:18:261202<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471203-v
1204</dt>
Junio C Hamano60186642010-12-02 14:18:261205<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471206--verbose
Junio C Hamano1e6e0062007-07-13 05:33:251207</dt>
1208<dd>
1209<p>
1210 Show unified diff between the HEAD commit and what
1211 would be committed at the bottom of the commit message
Junio C Hamano60186642010-12-02 14:18:261212 template. Note that this diff output doesn&#8217;t have its
Junio C Hamano1e6e0062007-07-13 05:33:251213 lines prefixed with <em>#</em>.
1214</p>
1215</dd>
Junio C Hamano60186642010-12-02 14:18:261216<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471217-q
1218</dt>
Junio C Hamano60186642010-12-02 14:18:261219<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471220--quiet
Junio C Hamano7d23f5e2006-12-16 07:44:041221</dt>
1222<dd>
1223<p>
Junio C Hamanof9771f62007-01-17 17:42:301224 Suppress commit summary message.
Junio C Hamano7d23f5e2006-12-16 07:44:041225</p>
1226</dd>
Junio C Hamano60186642010-12-02 14:18:261227<dt class="hdlist1">
Junio C Hamano1bb31992009-08-29 04:24:081228--dry-run
1229</dt>
1230<dd>
1231<p>
1232 Do not create a commit, but show a list of paths that are
1233 to be committed, paths with local changes that will be left
1234 uncommitted and paths that are untracked.
1235</p>
1236</dd>
Junio C Hamano60186642010-12-02 14:18:261237<dt class="hdlist1">
Junio C Hamano6ce6b6c2010-01-18 01:25:501238--status
1239</dt>
1240<dd>
1241<p>
Junio C Hamanoa28a9202012-06-21 07:08:231242 Include the output of <a href="git-status.html">git-status(1)</a> in the commit
Junio C Hamano6ce6b6c2010-01-18 01:25:501243 message template when using an editor to prepare the commit
1244 message. Defaults to on, but can be used to override
1245 configuration variable commit.status.
1246</p>
1247</dd>
Junio C Hamano60186642010-12-02 14:18:261248<dt class="hdlist1">
Junio C Hamano6ce6b6c2010-01-18 01:25:501249--no-status
1250</dt>
1251<dd>
1252<p>
Junio C Hamanoa28a9202012-06-21 07:08:231253 Do not include the output of <a href="git-status.html">git-status(1)</a> in the
Junio C Hamano6ce6b6c2010-01-18 01:25:501254 commit message template when using an editor to prepare the
1255 default commit message.
1256</p>
1257</dd>
Junio C Hamano60186642010-12-02 14:18:261258<dt class="hdlist1">
Junio C Hamanoa1295452012-11-13 22:32:041259-S[&lt;keyid&gt;]
1260</dt>
1261<dt class="hdlist1">
1262--gpg-sign[=&lt;keyid&gt;]
1263</dt>
1264<dd>
1265<p>
1266 GPG-sign commit.
1267</p>
1268</dd>
1269<dt class="hdlist1">
Junio C Hamano1bb569e2006-05-05 23:14:251270--
Junio C Hamano1a4e8412005-12-27 08:17:231271</dt>
1272<dd>
1273<p>
1274 Do not interpret any more arguments as options.
1275</p>
1276</dd>
Junio C Hamano60186642010-12-02 14:18:261277<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231278&lt;file&gt;&#8230;
1279</dt>
1280<dd>
1281<p>
Junio C Hamanoe7935c42006-12-13 21:32:171282 When files are given on the command line, the command
1283 commits the contents of the named files, without
1284 recording the changes already staged. The contents of
1285 these files are also staged for the next commit on top
1286 of what have been staged before.
Junio C Hamano1a4e8412005-12-27 08:17:231287</p>
1288</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311289</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:231290</div>
Junio C Hamano9d971152012-12-19 00:43:111291</div>
1292<div class="sect1">
Junio C Hamanoae05fee2010-01-08 07:39:461293<h2 id="_date_formats">DATE FORMATS</h2>
1294<div class="sectionbody">
Junio C Hamano60186642010-12-02 14:18:261295<div class="paragraph"><p>The GIT_AUTHOR_DATE, GIT_COMMITTER_DATE environment variables
Junio C Hamano9d971152012-12-19 00:43:111296and the <code>--date</code> option
Junio C Hamanoae05fee2010-01-08 07:39:461297support the following date formats:</p></div>
Junio C Hamano60186642010-12-02 14:18:261298<div class="dlist"><dl>
1299<dt class="hdlist1">
Junio C Hamanoae05fee2010-01-08 07:39:461300Git internal format
1301</dt>
1302<dd>
1303<p>
Junio C Hamano9d971152012-12-19 00:43:111304 It is <code>&lt;unix timestamp&gt; &lt;timezone offset&gt;</code>, where <code>&lt;unix
1305 timestamp&gt;</code> is the number of seconds since the UNIX epoch.
1306 <code>&lt;timezone offset&gt;</code> is a positive or negative offset from UTC.
1307 For example CET (which is 2 hours ahead UTC) is <code>+0200</code>.
Junio C Hamanoae05fee2010-01-08 07:39:461308</p>
1309</dd>
Junio C Hamano60186642010-12-02 14:18:261310<dt class="hdlist1">
Junio C Hamanoae05fee2010-01-08 07:39:461311RFC 2822
1312</dt>
1313<dd>
1314<p>
1315 The standard email format as described by RFC 2822, for example
Junio C Hamano9d971152012-12-19 00:43:111316 <code>Thu, 07 Apr 2005 22:13:13 +0200</code>.
Junio C Hamanoae05fee2010-01-08 07:39:461317</p>
1318</dd>
Junio C Hamano60186642010-12-02 14:18:261319<dt class="hdlist1">
Junio C Hamanoae05fee2010-01-08 07:39:461320ISO 8601
1321</dt>
1322<dd>
1323<p>
1324 Time and date specified by the ISO 8601 standard, for example
Junio C Hamano9d971152012-12-19 00:43:111325 <code>2005-04-07T22:13:13</code>. The parser accepts a space instead of the
1326 <code>T</code> character as well.
Junio C Hamanoae05fee2010-01-08 07:39:461327</p>
1328<div class="admonitionblock">
1329<table><tr>
1330<td class="icon">
1331<div class="title">Note</div>
1332</td>
1333<td class="content">In addition, the date part is accepted in the following formats:
Junio C Hamano9d971152012-12-19 00:43:111334<code>YYYY.MM.DD</code>, <code>MM/DD/YYYY</code> and <code>DD.MM.YYYY</code>.</td>
Junio C Hamanoae05fee2010-01-08 07:39:461335</tr></table>
1336</div>
1337</dd>
1338</dl></div>
1339</div>
Junio C Hamano9d971152012-12-19 00:43:111340</div>
1341<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311342<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano40f2f8d2006-02-07 08:04:391343<div class="sectionbody">
Junio C Hamano60186642010-12-02 14:18:261344<div class="paragraph"><p>When recording your own work, the contents of modified files in
Junio C Hamanoe7935c42006-12-13 21:32:171345your working tree are temporarily stored to a staging area
Junio C Hamano1aa40d22010-01-21 17:46:431346called the "index" with <em>git add</em>. A file can be
Junio C Hamano361c1332007-11-14 12:17:221347reverted back, only in the index but not in the working tree,
Junio C Hamano9d971152012-12-19 00:43:111348to that of the last commit with <code>git reset HEAD -- &lt;file&gt;</code>,
Junio C Hamano1aa40d22010-01-21 17:46:431349which effectively reverts <em>git add</em> and prevents the changes to
Junio C Hamano361c1332007-11-14 12:17:221350this file from participating in the next commit. After building
1351the state to be committed incrementally with these commands,
Junio C Hamano9d971152012-12-19 00:43:111352<code>git commit</code> (without any pathname parameter) is used to record what
Junio C Hamanoe7935c42006-12-13 21:32:171353has been staged so far. This is the most basic form of the
Junio C Hamanoba4b9282008-07-06 05:20:311354command. An example:</p></div>
Junio C Hamanoe7935c42006-12-13 21:32:171355<div class="listingblock">
Junio C Hamano40f2f8d2006-02-07 08:04:391356<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111357<pre><code>$ edit hello.c
Junio C Hamanoe7935c42006-12-13 21:32:171358$ git rm goodbye.c
1359$ git add hello.c
Junio C Hamano9d971152012-12-19 00:43:111360$ git commit</code></pre>
Junio C Hamano40f2f8d2006-02-07 08:04:391361</div></div>
Junio C Hamano60186642010-12-02 14:18:261362<div class="paragraph"><p>Instead of staging files after each individual change, you can
Junio C Hamano9d971152012-12-19 00:43:111363tell <code>git commit</code> to notice the changes to the files whose
Junio C Hamanoe7935c42006-12-13 21:32:171364contents are tracked in
Junio C Hamano9d971152012-12-19 00:43:111365your working tree and do corresponding <code>git add</code> and <code>git rm</code>
Junio C Hamanoe7935c42006-12-13 21:32:171366for you. That is, this example does the same as the earlier
Junio C Hamanoba4b9282008-07-06 05:20:311367example if there is no other change in your working tree:</p></div>
Junio C Hamanoe7935c42006-12-13 21:32:171368<div class="listingblock">
1369<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111370<pre><code>$ edit hello.c
Junio C Hamanoe7935c42006-12-13 21:32:171371$ rm goodbye.c
Junio C Hamano9d971152012-12-19 00:43:111372$ git commit -a</code></pre>
Junio C Hamanoe7935c42006-12-13 21:32:171373</div></div>
Junio C Hamano9d971152012-12-19 00:43:111374<div class="paragraph"><p>The command <code>git commit -a</code> first looks at your working tree,
Junio C Hamanoe7935c42006-12-13 21:32:171375notices that you have modified hello.c and removed goodbye.c,
Junio C Hamano9d971152012-12-19 00:43:111376and performs necessary <code>git add</code> and <code>git rm</code> for you.</p></div>
Junio C Hamano60186642010-12-02 14:18:261377<div class="paragraph"><p>After staging changes to many files, you can alter the order the
Junio C Hamano9d971152012-12-19 00:43:111378changes are recorded in, by giving pathnames to <code>git commit</code>.
Junio C Hamanoe7935c42006-12-13 21:32:171379When pathnames are given, the command makes a commit that
Junio C Hamanoba4b9282008-07-06 05:20:311380only records the changes made to the named paths:</p></div>
Junio C Hamanoe7935c42006-12-13 21:32:171381<div class="listingblock">
1382<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111383<pre><code>$ edit hello.c hello.h
Junio C Hamanoe7935c42006-12-13 21:32:171384$ git add hello.c hello.h
1385$ edit Makefile
Junio C Hamano9d971152012-12-19 00:43:111386$ git commit Makefile</code></pre>
Junio C Hamanoe7935c42006-12-13 21:32:171387</div></div>
Junio C Hamano9d971152012-12-19 00:43:111388<div class="paragraph"><p>This makes a commit that records the modification to <code>Makefile</code>.
1389The changes staged for <code>hello.c</code> and <code>hello.h</code> are not included
Junio C Hamano60186642010-12-02 14:18:261390in the resulting commit. However, their changes are not lost&#8201;&#8212;&#8201;they are still staged and merely held back. After the above
Junio C Hamanoba4b9282008-07-06 05:20:311391sequence, if you do:</p></div>
Junio C Hamanoe7935c42006-12-13 21:32:171392<div class="listingblock">
1393<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111394<pre><code>$ git commit</code></pre>
Junio C Hamanoe7935c42006-12-13 21:32:171395</div></div>
Junio C Hamano9d971152012-12-19 00:43:111396<div class="paragraph"><p>this second commit would record the changes to <code>hello.c</code> and
1397<code>hello.h</code> as expected.</p></div>
Junio C Hamano60186642010-12-02 14:18:261398<div class="paragraph"><p>After a merge (initiated by <em>git merge</em> or <em>git pull</em>) stops
Junio C Hamanofce7c7e2008-07-02 03:06:381399because of conflicts, cleanly merged
Junio C Hamanoe7935c42006-12-13 21:32:171400paths are already staged to be committed for you, and paths that
1401conflicted are left in unmerged state. You would have to first
Junio C Hamano1aa40d22010-01-21 17:46:431402check which paths are conflicting with <em>git status</em>
Junio C Hamanoe7935c42006-12-13 21:32:171403and after fixing them manually in your working tree, you would
Junio C Hamano1aa40d22010-01-21 17:46:431404stage the result as usual with <em>git add</em>:</p></div>
Junio C Hamanoe7935c42006-12-13 21:32:171405<div class="listingblock">
1406<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111407<pre><code>$ git status | grep unmerged
Junio C Hamanoe7935c42006-12-13 21:32:171408unmerged: hello.c
1409$ edit hello.c
Junio C Hamano9d971152012-12-19 00:43:111410$ git add hello.c</code></pre>
Junio C Hamanoe7935c42006-12-13 21:32:171411</div></div>
Junio C Hamano9d971152012-12-19 00:43:111412<div class="paragraph"><p>After resolving conflicts and staging the result, <code>git ls-files -u</code>
Junio C Hamanoe7935c42006-12-13 21:32:171413would stop mentioning the conflicted path. When you are done,
Junio C Hamano9d971152012-12-19 00:43:111414run <code>git commit</code> to finally record the merge:</p></div>
Junio C Hamanoe7935c42006-12-13 21:32:171415<div class="listingblock">
1416<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111417<pre><code>$ git commit</code></pre>
Junio C Hamanoe7935c42006-12-13 21:32:171418</div></div>
Junio C Hamano9d971152012-12-19 00:43:111419<div class="paragraph"><p>As with the case to record your own changes, you can use <code>-a</code>
Junio C Hamanoe7935c42006-12-13 21:32:171420option to save typing. One difference is that during a merge
Junio C Hamano9d971152012-12-19 00:43:111421resolution, you cannot use <code>git commit</code> with pathnames to
Junio C Hamanoe7935c42006-12-13 21:32:171422alter the order the changes are committed, because the merge
1423should be recorded as a single commit. In fact, the command
Junio C Hamano9d971152012-12-19 00:43:111424refuses to run when given pathnames (but see <code>-i</code> option).</p></div>
Junio C Hamanoe7935c42006-12-13 21:32:171425</div>
Junio C Hamano9d971152012-12-19 00:43:111426</div>
1427<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311428<h2 id="_discussion">DISCUSSION</h2>
Junio C Hamano775a0f42006-12-31 01:19:141429<div class="sectionbody">
Junio C Hamano60186642010-12-02 14:18:261430<div class="paragraph"><p>Though not required, it&#8217;s a good idea to begin the commit message
Junio C Hamano8f76dc62007-01-17 07:24:251431with a single short (less than 50 character) line summarizing the
1432change, followed by a blank line and then a more thorough description.
Junio C Hamano281fd392012-09-17 23:57:411433The text up to the first blank line in a commit message is treated
1434as the commit title, and that title is used throughout git.
1435For example, <a href="git-format-patch.html">git-format-patch(1)</a> turns a commit into email, and it uses
1436the title on the Subject line and the rest of the commit in the body.</p></div>
Junio C Hamano60186642010-12-02 14:18:261437<div class="paragraph"><p>At the core level, git is character encoding agnostic.</p></div>
1438<div class="ulist"><ul>
Junio C Hamano775a0f42006-12-31 01:19:141439<li>
1440<p>
1441The pathnames recorded in the index and in the tree objects
1442 are treated as uninterpreted sequences of non-NUL bytes.
1443 What readdir(2) returns are what are recorded and compared
1444 with the data git keeps track of, which in turn are expected
1445 to be what lstat(2) and creat(2) accepts. There is no such
1446 thing as pathname encoding translation.
1447</p>
1448</li>
1449<li>
1450<p>
Junio C Hamano54bf1e22008-12-20 06:30:111451The contents of the blob objects are uninterpreted sequences
Junio C Hamano775a0f42006-12-31 01:19:141452 of bytes. There is no encoding translation at the core
1453 level.
1454</p>
1455</li>
1456<li>
1457<p>
Junio C Hamano54bf1e22008-12-20 06:30:111458The commit log messages are uninterpreted sequences of non-NUL
Junio C Hamano775a0f42006-12-31 01:19:141459 bytes.
1460</p>
1461</li>
Junio C Hamanoba4b9282008-07-06 05:20:311462</ul></div>
Junio C Hamano60186642010-12-02 14:18:261463<div class="paragraph"><p>Although we encourage that the commit log messages are encoded
Junio C Hamano775a0f42006-12-31 01:19:141464in UTF-8, both the core and git Porcelain are designed not to
1465force UTF-8 on projects. If all participants of a particular
1466project find it more convenient to use legacy encodings, git
1467does not forbid it. However, there are a few things to keep in
Junio C Hamanoba4b9282008-07-06 05:20:311468mind.</p></div>
Junio C Hamano60186642010-12-02 14:18:261469<div class="olist arabic"><ol class="arabic">
Junio C Hamano775a0f42006-12-31 01:19:141470<li>
1471<p>
Junio C Hamano1aa40d22010-01-21 17:46:431472<em>git commit</em> and <em>git commit-tree</em> issues
Junio C Hamano14b76482008-01-05 10:32:261473 a warning if the commit log message given to it does not look
Junio C Hamano775a0f42006-12-31 01:19:141474 like a valid UTF-8 string, unless you explicitly say your
1475 project uses a legacy encoding. The way to say this is to
Junio C Hamano9d971152012-12-19 00:43:111476 have i18n.commitencoding in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:141477</p>
1478<div class="listingblock">
1479<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111480<pre><code>[i18n]
1481 commitencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:141482</div></div>
Junio C Hamano60186642010-12-02 14:18:261483<div class="paragraph"><p>Commit objects created with the above setting record the value
Junio C Hamano9d971152012-12-19 00:43:111484of <code>i18n.commitencoding</code> in its <code>encoding</code> header. This is to
Junio C Hamano775a0f42006-12-31 01:19:141485help other people who look at them later. Lack of this header
Junio C Hamanoba4b9282008-07-06 05:20:311486implies that the commit log message is encoded in UTF-8.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:141487</li>
1488<li>
1489<p>
Junio C Hamano1aa40d22010-01-21 17:46:431490<em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
Junio C Hamano9d971152012-12-19 00:43:111491 <code>encoding</code> header of a commit object, and try to re-code the
Junio C Hamanoaa17c7c2008-11-03 04:36:581492 log message into UTF-8 unless otherwise specified. You can
Junio C Hamano775a0f42006-12-31 01:19:141493 specify the desired output encoding with
Junio C Hamano9d971152012-12-19 00:43:111494 <code>i18n.logoutputencoding</code> in <code>.git/config</code> file, like this:
Junio C Hamano775a0f42006-12-31 01:19:141495</p>
1496<div class="listingblock">
1497<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111498<pre><code>[i18n]
1499 logoutputencoding = ISO-8859-1</code></pre>
Junio C Hamano775a0f42006-12-31 01:19:141500</div></div>
Junio C Hamano60186642010-12-02 14:18:261501<div class="paragraph"><p>If you do not have this configuration variable, the value of
Junio C Hamano9d971152012-12-19 00:43:111502<code>i18n.commitencoding</code> is used instead.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:141503</li>
Junio C Hamanoba4b9282008-07-06 05:20:311504</ol></div>
Junio C Hamano60186642010-12-02 14:18:261505<div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log
Junio C Hamano775a0f42006-12-31 01:19:141506message when a commit is made to force UTF-8 at the commit
1507object level, because re-coding to UTF-8 is not necessarily a
Junio C Hamanoba4b9282008-07-06 05:20:311508reversible operation.</p></div>
Junio C Hamano775a0f42006-12-31 01:19:141509</div>
Junio C Hamano9d971152012-12-19 00:43:111510</div>
1511<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311512<h2 id="_environment_and_configuration_variables">ENVIRONMENT AND CONFIGURATION VARIABLES</h2>
Junio C Hamanoe7935c42006-12-13 21:32:171513<div class="sectionbody">
Junio C Hamano60186642010-12-02 14:18:261514<div class="paragraph"><p>The editor used to edit the commit log message will be chosen from the
Junio C Hamanof6002a92007-07-20 10:28:221515GIT_EDITOR environment variable, the core.editor configuration variable, the
1516VISUAL environment variable, or the EDITOR environment variable (in that
Junio C Hamanoa28a9202012-06-21 07:08:231517order). See <a href="git-var.html">git-var(1)</a> for details.</p></div>
Junio C Hamanoe7935c42006-12-13 21:32:171518</div>
Junio C Hamano9d971152012-12-19 00:43:111519</div>
1520<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311521<h2 id="_hooks">HOOKS</h2>
Junio C Hamanoe7935c42006-12-13 21:32:171522<div class="sectionbody">
Junio C Hamano9d971152012-12-19 00:43:111523<div class="paragraph"><p>This command can run <code>commit-msg</code>, <code>prepare-commit-msg</code>, <code>pre-commit</code>,
1524and <code>post-commit</code> hooks. See <a href="githooks.html">githooks(5)</a> for more
Junio C Hamanoba4b9282008-07-06 05:20:311525information.</p></div>
Junio C Hamanoe7935c42006-12-13 21:32:171526</div>
Junio C Hamano9d971152012-12-19 00:43:111527</div>
1528<div class="sect1">
Junio C Hamano28a85be2012-07-24 22:05:151529<h2 id="_files">FILES</h2>
1530<div class="sectionbody">
1531<div class="dlist"><dl>
1532<dt class="hdlist1">
Junio C Hamano9d971152012-12-19 00:43:111533<code>$GIT_DIR/COMMIT_EDITMSG</code>
Junio C Hamano28a85be2012-07-24 22:05:151534</dt>
1535<dd>
1536<p>
1537 This file contains the commit message of a commit in progress.
Junio C Hamano9d971152012-12-19 00:43:111538 If <code>git commit</code> exits due to an error before creating a commit,
Junio C Hamano28a85be2012-07-24 22:05:151539 any commit message that has been provided by the user (e.g., in
1540 an editor session) will be available in this file, but will be
Junio C Hamano9d971152012-12-19 00:43:111541 overwritten by the next invocation of <code>git commit</code>.
Junio C Hamano28a85be2012-07-24 22:05:151542</p>
1543</dd>
1544</dl></div>
1545</div>
Junio C Hamano9d971152012-12-19 00:43:111546</div>
1547<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311548<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamanoe7935c42006-12-13 21:32:171549<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231550<div class="paragraph"><p><a href="git-add.html">git-add(1)</a>,
1551<a href="git-rm.html">git-rm(1)</a>,
1552<a href="git-mv.html">git-mv(1)</a>,
1553<a href="git-merge.html">git-merge(1)</a>,
1554<a href="git-commit-tree.html">git-commit-tree(1)</a></p></div>
Junio C Hamano40f2f8d2006-02-07 08:04:391555</div>
Junio C Hamano9d971152012-12-19 00:43:111556</div>
1557<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311558<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231559<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231560<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:231561</div>
Junio C Hamano7bd050f2011-09-22 06:32:221562</div>
Junio C Hamano9d971152012-12-19 00:43:111563</div>
Junio C Hamano7bd050f2011-09-22 06:32:221564<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:231565<div id="footer">
1566<div id="footer-text">
Junio C Hamanoce836cc2013-01-21 02:01:531567Last updated 2013-01-20 18:01:21 PST
Junio C Hamano1a4e8412005-12-27 08:17:231568</div>
1569</div>
1570</body>
1571</html>