]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-commit-tree.txt
commit-tree: update the command line parsing
[thirdparty/git.git] / Documentation / git-commit-tree.txt
CommitLineData
2cf565c5
DG
1git-commit-tree(1)
2==================
2cf565c5
DG
3
4NAME
5----
c3f0baac 6git-commit-tree - Create a new commit object
2cf565c5
DG
7
8
9SYNOPSIS
10--------
7791a1d9 11[verse]
0adda936 12'git commit-tree' <tree> [(-p <parent commit>)...] < changelog
2cf565c5
DG
13
14DESCRIPTION
15-----------
5cb545fa 16This is usually not what an end user wants to run directly. See
5162e697 17linkgit:git-commit[1] instead.
5cb545fa 18
2cf565c5 19Creates a new commit object based on the provided tree object and
b3bc97cb 20emits the new commit object id on stdout.
2cf565c5 21
b3bc97cb
TR
22A commit object may have any number of parents. With exactly one
23parent, it is an ordinary commit. Having more than one parent makes
24the commit a merge between several lines of history. Initial (root)
25commits have no parents.
2cf565c5
DG
26
27While a tree represents a particular directory state of a working
28directory, a commit represents that state in "time", and explains how
29to get there.
30
31Normally a commit would identify a new "HEAD" state, and while git
32doesn't care where you save the note about that state, in practice we
27dedf0c
JH
33tend to just write the result to the file that is pointed at by
34`.git/HEAD`, so that we can always see what the last committed
35state was.
2cf565c5
DG
36
37OPTIONS
38-------
39<tree>::
40 An existing tree object
41
42-p <parent commit>::
f73ae1fc 43 Each '-p' indicates the id of a parent commit object.
a6080a0a 44
2cf565c5
DG
45
46Commit Information
47------------------
48
49A commit encapsulates:
50
51- all parent object ids
52- author name, email and date
53- committer name and email and the commit time.
54
0734d265 55While parent object ids are provided on the command line, author and
02783075 56committer information is taken from the following environment variables,
0734d265 57if set:
2cf565c5
DG
58
59 GIT_AUTHOR_NAME
60 GIT_AUTHOR_EMAIL
61 GIT_AUTHOR_DATE
62 GIT_COMMITTER_NAME
63 GIT_COMMITTER_EMAIL
4e58bf97 64 GIT_COMMITTER_DATE
28a94f88 65 EMAIL
2cf565c5 66
df8baa42 67(nb "<", ">" and "\n"s are stripped)
2cf565c5 68
0734d265
MH
69In case (some of) these environment variables are not set, the information
70is taken from the configuration items user.name and user.email, or, if not
8a55caa8
JN
71present, system user name and the hostname used for outgoing mail (taken
72from `/etc/mailname` and falling back to the fully qualified hostname when
73that file does not exist).
5773c9f2 74
a82830a4 75A commit comment is read from stdin. If a changelog
0b444cdb 76entry is not provided via "<" redirection, 'git commit-tree' will just wait
df8baa42 77for one to be entered and terminated with ^D.
2cf565c5 78
788070a2 79include::date-formats.txt[]
5773c9f2 80
c1bdacf9
DG
81Diagnostics
82-----------
83You don't exist. Go away!::
84 The passwd(5) gecos field couldn't be read
9153368d 85Your parents must have hated you!::
73bae1dc 86 The passwd(5) gecos field is longer than a giant static buffer.
9153368d 87Your sysadmin must hate you!::
73bae1dc 88 The passwd(5) name field is longer than a giant static buffer.
c1bdacf9 89
5dc7bcc2
JH
90Discussion
91----------
92
93include::i18n.txt[]
94
8a55caa8
JN
95FILES
96-----
97/etc/mailname
98
56ae8df5 99SEE ALSO
c1bdacf9 100--------
5162e697 101linkgit:git-write-tree[1]
2cf565c5 102
2cf565c5
DG
103GIT
104---
9e1f0a85 105Part of the linkgit:git[1] suite