GIT 0.99.9j aka 1.0rc3
[git/jrn.git] / Documentation / git-commit-tree.txt
bloba794192d7b50438a2a04aaad816b57dd38f79272
1 git-commit-tree(1)
2 ==================
4 NAME
5 ----
6 git-commit-tree - Creates a new commit object
9 SYNOPSIS
10 --------
11 'git-commit-tree' <tree> [-p <parent commit>]\* < changelog
13 DESCRIPTION
14 -----------
15 Creates a new commit object based on the provided tree object and
16 emits the new commit object id on stdout. If no parent is given then
17 it is considered to be an initial tree.
19 A commit object usually has 1 parent (a commit after a change) or up
20 to 16 parents.  More than one parent represents a merge of branches
21 that led to them.
23 While a tree represents a particular directory state of a working
24 directory, a commit represents that state in "time", and explains how
25 to get there.
27 Normally a commit would identify a new "HEAD" state, and while git
28 doesn't care where you save the note about that state, in practice we
29 tend to just write the result to the file that is pointed at by
30 `.git/HEAD`, so that we can always see what the last committed
31 state was.
33 OPTIONS
34 -------
35 <tree>::
36         An existing tree object
38 -p <parent commit>::
39         Each '-p' indicates the id of a parent commit object.
40         
42 Commit Information
43 ------------------
45 A commit encapsulates:
47 - all parent object ids
48 - author name, email and date
49 - committer name and email and the commit time.
51 If not provided, "git-commit-tree" uses your name, hostname and domain to
52 provide author and committer info. This can be overridden by
53 either `.git/config` file, or using the following environment variables.
55         GIT_AUTHOR_NAME
56         GIT_AUTHOR_EMAIL
57         GIT_AUTHOR_DATE
58         GIT_COMMITTER_NAME
59         GIT_COMMITTER_EMAIL
61 (nb "<", ">" and "\n"s are stripped)
63 In `.git/config` file, the following items are used:
65         [user]
66                 name = "Your Name"
67                 email = "your@email.address.xz"
69 A commit comment is read from stdin (max 999 chars). If a changelog
70 entry is not provided via "<" redirection, "git-commit-tree" will just wait
71 for one to be entered and terminated with ^D.
74 Diagnostics
75 -----------
76 You don't exist. Go away!::
77     The passwd(5) gecos field couldn't be read
78 Your parents must have hated you!::
79     The password(5) gecos field is longer than a giant static buffer.
80 Your sysadmin must hate you!::
81     The password(5) name field is longer than a giant static buffer.
83 See Also
84 --------
85 gitlink:git-write-tree[1]
88 Author
89 ------
90 Written by Linus Torvalds <torvalds@osdl.org>
92 Documentation
93 --------------
94 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
96 GIT
97 ---
98 Part of the gitlink:git[7] suite