2005-05-11 05:32:30 +08:00
|
|
|
git-commit-tree(1)
|
|
|
|
==================
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2007-01-19 07:53:37 +08:00
|
|
|
git-commit-tree - Create a new commit object
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2010-10-09 01:31:17 +08:00
|
|
|
'git commit-tree' <tree> [(-p <parent commit>)...] < changelog
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2007-01-18 05:03:29 +08:00
|
|
|
This is usually not what an end user wants to run directly. See
|
2007-12-29 14:20:38 +08:00
|
|
|
linkgit:git-commit[1] instead.
|
2007-01-18 05:03:29 +08:00
|
|
|
|
2005-05-11 05:32:30 +08:00
|
|
|
Creates a new commit object based on the provided tree object and
|
2008-08-08 15:52:55 +08:00
|
|
|
emits the new commit object id on stdout.
|
2005-05-11 05:32:30 +08:00
|
|
|
|
2008-08-08 15:52:55 +08:00
|
|
|
A commit object may have any number of parents. With exactly one
|
|
|
|
parent, it is an ordinary commit. Having more than one parent makes
|
|
|
|
the commit a merge between several lines of history. Initial (root)
|
|
|
|
commits have no parents.
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
While a tree represents a particular directory state of a working
|
|
|
|
directory, a commit represents that state in "time", and explains how
|
|
|
|
to get there.
|
|
|
|
|
|
|
|
Normally a commit would identify a new "HEAD" state, and while git
|
|
|
|
doesn't care where you save the note about that state, in practice we
|
2005-11-17 13:32:44 +08:00
|
|
|
tend to just write the result to the file that is pointed at by
|
|
|
|
`.git/HEAD`, so that we can always see what the last committed
|
|
|
|
state was.
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
|
|
|
<tree>::
|
|
|
|
An existing tree object
|
|
|
|
|
|
|
|
-p <parent commit>::
|
2005-10-06 06:08:26 +08:00
|
|
|
Each '-p' indicates the id of a parent commit object.
|
2007-06-07 15:04:01 +08:00
|
|
|
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
Commit Information
|
|
|
|
------------------
|
|
|
|
|
|
|
|
A commit encapsulates:
|
|
|
|
|
|
|
|
- all parent object ids
|
|
|
|
- author name, email and date
|
|
|
|
- committer name and email and the commit time.
|
|
|
|
|
2007-08-18 04:13:36 +08:00
|
|
|
While parent object ids are provided on the command line, author and
|
2007-08-24 08:44:13 +08:00
|
|
|
committer information is taken from the following environment variables,
|
2007-08-18 04:13:36 +08:00
|
|
|
if set:
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
GIT_AUTHOR_NAME
|
|
|
|
GIT_AUTHOR_EMAIL
|
|
|
|
GIT_AUTHOR_DATE
|
|
|
|
GIT_COMMITTER_NAME
|
|
|
|
GIT_COMMITTER_EMAIL
|
2007-04-29 09:40:12 +08:00
|
|
|
GIT_COMMITTER_DATE
|
2007-04-29 09:40:28 +08:00
|
|
|
EMAIL
|
2005-05-11 05:32:30 +08:00
|
|
|
|
2005-10-04 01:16:30 +08:00
|
|
|
(nb "<", ">" and "\n"s are stripped)
|
2005-05-11 05:32:30 +08:00
|
|
|
|
2007-08-18 04:13:36 +08:00
|
|
|
In case (some of) these environment variables are not set, the information
|
|
|
|
is taken from the configuration items user.name and user.email, or, if not
|
|
|
|
present, system user name and fully qualified hostname.
|
2005-10-30 05:32:56 +08:00
|
|
|
|
2007-07-15 13:56:47 +08:00
|
|
|
A commit comment is read from stdin. If a changelog
|
2010-01-10 07:33:00 +08:00
|
|
|
entry is not provided via "<" redirection, 'git commit-tree' will just wait
|
2005-10-04 01:16:30 +08:00
|
|
|
for one to be entered and terminated with ^D.
|
2005-05-11 05:32:30 +08:00
|
|
|
|
2009-12-03 07:49:19 +08:00
|
|
|
include::date-formats.txt[]
|
2005-10-30 05:32:56 +08:00
|
|
|
|
2005-05-11 05:32:38 +08:00
|
|
|
Diagnostics
|
|
|
|
-----------
|
|
|
|
You don't exist. Go away!::
|
|
|
|
The passwd(5) gecos field couldn't be read
|
2005-07-15 08:57:53 +08:00
|
|
|
Your parents must have hated you!::
|
2008-09-03 16:50:43 +08:00
|
|
|
The passwd(5) gecos field is longer than a giant static buffer.
|
2005-07-15 08:57:53 +08:00
|
|
|
Your sysadmin must hate you!::
|
2008-09-03 16:50:43 +08:00
|
|
|
The passwd(5) name field is longer than a giant static buffer.
|
2005-05-11 05:32:38 +08:00
|
|
|
|
2006-12-30 18:22:38 +08:00
|
|
|
Discussion
|
|
|
|
----------
|
|
|
|
|
|
|
|
include::i18n.txt[]
|
|
|
|
|
2008-05-29 07:55:27 +08:00
|
|
|
SEE ALSO
|
2005-05-11 05:32:38 +08:00
|
|
|
--------
|
2007-12-29 14:20:38 +08:00
|
|
|
linkgit:git-write-tree[1]
|
2005-05-11 05:32:30 +08:00
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
2008-06-06 15:07:32 +08:00
|
|
|
Part of the linkgit:git[1] suite
|