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">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <meta name=
"generator" content=
"AsciiDoc 8.4.5" />
7 <title>git-commit-tree(
1)
</title>
8 <style type=
"text/css">
10 p
, li
, dt
, dd
, div
, pre
, h1
, h2
, h3
, h4
, h5
, h6
{
12 border: 1px solid red;
17 margin: 1em 5% 1em 5%;
22 text-decoration: underline
;
42 h1
, h2
, h3
, h4
, h5
, h6
{
44 font-family: sans-serif
;
51 border-bottom: 2px solid silver
;
69 border: 1px solid silver
;
88 font-family: sans-serif
;
94 span#revnumber
, span#revdate
, span#revremark
{
95 font-family: sans-serif
;
99 font-family: sans-serif
;
101 border-top: 2px solid silver
;
107 padding-bottom: 0.5em;
111 padding-bottom: 0.5em;
116 margin-bottom: 1.5em;
118 div
.tableblock
, div
.imageblock
, div
.exampleblock
, div
.verseblock
,
119 div
.quoteblock
, div
.literalblock
, div
.listingblock
, div
.sidebarblock
,
120 div
.admonitionblock
{
122 margin-bottom: 1.5em;
124 div
.admonitionblock
{
126 margin-bottom: 2.5em;
129 div
.content
{ /* Block element content. */
133 /* Block element titles. */
134 div
.title
, caption
.title
{
136 font-family: sans-serif
;
140 margin-bottom: 0.5em;
146 td div
.title:first-child
{
149 div
.content div
.title:first-child
{
152 div
.content
+ div
.title
{
156 div
.sidebarblock
> div
.content
{
158 border: 1px solid silver
;
162 div
.listingblock
> div
.content
{
163 border: 1px solid silver
;
172 div
.quoteblock
> div
.attribution
{
181 div
.verseblock
> div
.content
{
184 div
.verseblock
> div
.attribution
{
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div
.verseblock
+ div
.attribution
{
193 div
.admonitionblock
.icon
{
197 text-decoration: underline
;
199 padding-right: 0.5em;
201 div
.admonitionblock td
.content
{
203 border-left: 2px solid silver
;
206 div
.exampleblock
> div
.content
{
207 border-left: 2px solid silver
;
211 div
.imageblock div
.content
{ padding-left: 0; }
212 span
.image img
{ border-style: none
; }
213 a
.image:visited
{ color: white
; }
217 margin-bottom: 0.8em;
230 list-style-position: outside
;
233 list-style-type: decimal
;
236 list-style-type: lower-alpha
;
239 list-style-type: upper-alpha
;
242 list-style-type: lower-roman
;
245 list-style-type: upper-roman
;
248 div
.compact ul
, div
.compact ol
,
249 div
.compact p
, div
.compact p
,
250 div
.compact div
, div
.compact div
{
252 margin-bottom: 0.1em;
255 div
.tableblock
> table
{
256 border: 3px solid
#527bbd;
259 font-family: sans-serif
;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div
.tableblock
> table
[frame
="void"] {
275 div
.tableblock
> table
[frame
="hsides"] {
276 border-left-style: none
;
277 border-right-style: none
;
279 div
.tableblock
> table
[frame
="vsides"] {
280 border-top-style: none
;
281 border-bottom-style: none
;
287 margin-bottom: 0.8em;
290 padding-bottom: 15px;
292 dt
.hdlist1
.strong
, td
.hdlist1
.strong
{
298 padding-right: 0.8em;
304 div
.hdlist
.compact tr
{
314 div#footer-badges
{ display: none
; }
319 font-family: sans-serif
;
323 margin-bottom: 0.1em;
326 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
342 /* Overrides for manpage documents */
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver
;
347 border-bottom: 2px solid silver
;
357 div#toc
{ display: none
; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div
.sidebar-content
{
364 border: 1px solid silver
;
367 div
.sidebar-title
, div
.image-title
{
369 font-family: sans-serif
;
372 margin-bottom: 0.5em;
375 div
.listingblock div
.content
{
376 border: 1px solid silver
;
381 div
.quoteblock-attribution
{
386 div
.verseblock-content
{
389 div
.verseblock-attribution
{
394 div
.exampleblock-content
{
395 border-left: 2px solid silver
;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc
a:visited
{ color: blue
; }
406 git-commit-tree(
1) Manual Page
409 <div class=
"sectionbody">
411 Create a new commit object
415 <h2 id=
"_synopsis">SYNOPSIS
</h2>
416 <div class=
"sectionbody">
417 <div class=
"paragraph"><p><em>git commit-tree
</em> <tree
> [(-p
<parent commit
>)
…]
< changelog
</p></div>
419 <h2 id=
"_description">DESCRIPTION
</h2>
420 <div class=
"sectionbody">
421 <div class=
"paragraph"><p>This is usually not what an end user wants to run directly. See
422 <a href=
"git-commit.html">git-commit(
1)
</a> instead.
</p></div>
423 <div class=
"paragraph"><p>Creates a new commit object based on the provided tree object and
424 emits the new commit object id on stdout.
</p></div>
425 <div class=
"paragraph"><p>A commit object may have any number of parents. With exactly one
426 parent, it is an ordinary commit. Having more than one parent makes
427 the commit a merge between several lines of history. Initial (root)
428 commits have no parents.
</p></div>
429 <div class=
"paragraph"><p>While a tree represents a particular directory state of a working
430 directory, a commit represents that state in
"time", and explains how
431 to get there.
</p></div>
432 <div class=
"paragraph"><p>Normally a commit would identify a new
"HEAD" state, and while git
433 doesn
’t care where you save the note about that state, in practice we
434 tend to just write the result to the file that is pointed at by
435 <tt>.git/HEAD
</tt>, so that we can always see what the last committed
438 <h2 id=
"_options">OPTIONS
</h2>
439 <div class=
"sectionbody">
440 <div class=
"dlist"><dl>
446 An existing tree object
450 -p
<parent commit
>
454 Each
<em>-p
</em> indicates the id of a parent commit object.
459 <h2 id=
"_commit_information">Commit Information
</h2>
460 <div class=
"sectionbody">
461 <div class=
"paragraph"><p>A commit encapsulates:
</p></div>
462 <div class=
"ulist"><ul>
465 all parent object ids
470 author name, email and date
475 committer name and email and the commit time.
479 <div class=
"paragraph"><p>While parent object ids are provided on the command line, author and
480 committer information is taken from the following environment variables,
482 <div class=
"literalblock">
483 <div class=
"content">
484 <pre><tt>GIT_AUTHOR_NAME
492 <div class=
"paragraph"><p>(nb
"<",
">" and
"\n"s are stripped)
</p></div>
493 <div class=
"paragraph"><p>In case (some of) these environment variables are not set, the information
494 is taken from the configuration items user.name and user.email, or, if not
495 present, system user name and fully qualified hostname.
</p></div>
496 <div class=
"paragraph"><p>A commit comment is read from stdin. If a changelog
497 entry is not provided via
"<" redirection,
<em>git commit-tree
</em> will just wait
498 for one to be entered and terminated with ^D.
</p></div>
500 <h2 id=
"_date_formats">DATE FORMATS
</h2>
501 <div class=
"sectionbody">
502 <div class=
"paragraph"><p>The GIT_AUTHOR_DATE, GIT_COMMITTER_DATE environment variables
503 support the following date formats:
</p></div>
504 <div class=
"dlist"><dl>
510 It is
<tt><unix timestamp
> <timezone offset
></tt>, where
<tt><unix
511 timestamp
></tt> is the number of seconds since the UNIX epoch.
512 <tt><timezone offset
></tt> is a positive or negative offset from UTC.
513 For example CET (which is
2 hours ahead UTC) is
<tt>+
0200</tt>.
521 The standard email format as described by RFC
2822, for example
522 <tt>Thu,
07 Apr
2005 22:
13:
13 +
0200</tt>.
530 Time and date specified by the ISO
8601 standard, for example
531 <tt>2005-
04-
07T22:
13:
13</tt>. The parser accepts a space instead of the
532 <tt>T
</tt> character as well.
534 <div class=
"admonitionblock">
537 <div class=
"title">Note
</div>
539 <td class=
"content">In addition, the date part is accepted in the following formats:
540 <tt>YYYY.MM.DD
</tt>,
<tt>MM/DD/YYYY
</tt> and
<tt>DD.MM.YYYY
</tt>.
</td>
546 <h2 id=
"_diagnostics">Diagnostics
</h2>
547 <div class=
"sectionbody">
548 <div class=
"dlist"><dl>
550 You don
’t exist. Go away!
554 The passwd(
5) gecos field couldn
’t be read
558 Your parents must have hated you!
562 The passwd(
5) gecos field is longer than a giant static buffer.
566 Your sysadmin must hate you!
570 The passwd(
5) name field is longer than a giant static buffer.
575 <h2 id=
"_discussion">Discussion
</h2>
576 <div class=
"sectionbody">
577 <div class=
"paragraph"><p>At the core level, git is character encoding agnostic.
</p></div>
578 <div class=
"ulist"><ul>
581 The pathnames recorded in the index and in the tree objects
582 are treated as uninterpreted sequences of non-NUL bytes.
583 What readdir(
2) returns are what are recorded and compared
584 with the data git keeps track of, which in turn are expected
585 to be what lstat(
2) and creat(
2) accepts. There is no such
586 thing as pathname encoding translation.
591 The contents of the blob objects are uninterpreted sequences
592 of bytes. There is no encoding translation at the core
598 The commit log messages are uninterpreted sequences of non-NUL
603 <div class=
"paragraph"><p>Although we encourage that the commit log messages are encoded
604 in UTF-
8, both the core and git Porcelain are designed not to
605 force UTF-
8 on projects. If all participants of a particular
606 project find it more convenient to use legacy encodings, git
607 does not forbid it. However, there are a few things to keep in
609 <div class=
"olist arabic"><ol class=
"arabic">
612 <em>git commit
</em> and
<em>git commit-tree
</em> issues
613 a warning if the commit log message given to it does not look
614 like a valid UTF-
8 string, unless you explicitly say your
615 project uses a legacy encoding. The way to say this is to
616 have i18n.commitencoding in
<tt>.git/config
</tt> file, like this:
618 <div class=
"listingblock">
619 <div class=
"content">
621 commitencoding = ISO-
8859-
1</tt></pre>
623 <div class=
"paragraph"><p>Commit objects created with the above setting record the value
624 of
<tt>i18n.commitencoding
</tt> in its
<tt>encoding
</tt> header. This is to
625 help other people who look at them later. Lack of this header
626 implies that the commit log message is encoded in UTF-
8.
</p></div>
630 <em>git log
</em>,
<em>git show
</em>,
<em>git blame
</em> and friends look at the
631 <tt>encoding
</tt> header of a commit object, and try to re-code the
632 log message into UTF-
8 unless otherwise specified. You can
633 specify the desired output encoding with
634 <tt>i18n.logoutputencoding
</tt> in
<tt>.git/config
</tt> file, like this:
636 <div class=
"listingblock">
637 <div class=
"content">
639 logoutputencoding = ISO-
8859-
1</tt></pre>
641 <div class=
"paragraph"><p>If you do not have this configuration variable, the value of
642 <tt>i18n.commitencoding
</tt> is used instead.
</p></div>
645 <div class=
"paragraph"><p>Note that we deliberately chose not to re-code the commit log
646 message when a commit is made to force UTF-
8 at the commit
647 object level, because re-coding to UTF-
8 is not necessarily a
648 reversible operation.
</p></div>
650 <h2 id=
"_see_also">SEE ALSO
</h2>
651 <div class=
"sectionbody">
652 <div class=
"paragraph"><p><a href=
"git-write-tree.html">git-write-tree(
1)
</a></p></div>
654 <h2 id=
"_author">Author
</h2>
655 <div class=
"sectionbody">
656 <div class=
"paragraph"><p>Written by Linus Torvalds
<<a href=
"mailto:torvalds@osdl.org">torvalds@osdl.org
</a>></p></div>
658 <h2 id=
"_documentation">Documentation
</h2>
659 <div class=
"sectionbody">
660 <div class=
"paragraph"><p>Documentation by David Greaves, Junio C Hamano and the git-list
<<a href=
"mailto:git@vger.kernel.org">git@vger.kernel.org
</a>>.
</p></div>
662 <h2 id=
"_git">GIT
</h2>
663 <div class=
"sectionbody">
664 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
667 <div id=
"footer-text">
668 Last updated
2010-
11-
06 00:
41:
57 UTC