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