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