submodule: Fix t7400, t7405, t7406 for msysGit
[git/dscho.git] / Documentation / git-commit-tree.txt
blob02133d5fc9a14df7f4fe24d97bdf9980e77f807a
1 git-commit-tree(1)
2 ==================
4 NAME
5 ----
6 git-commit-tree - Create a new commit object
9 SYNOPSIS
10 --------
11 [verse]
12 'git commit-tree' <tree> [(-p <parent commit>)...] < changelog
14 DESCRIPTION
15 -----------
16 This is usually not what an end user wants to run directly.  See
17 linkgit:git-commit[1] instead.
19 Creates a new commit object based on the provided tree object and
20 emits the new commit object id on stdout.
22 A commit object may have any number of parents. With exactly one
23 parent, it is an ordinary commit. Having more than one parent makes
24 the commit a merge between several lines of history. Initial (root)
25 commits have no parents.
27 While a tree represents a particular directory state of a working
28 directory, a commit represents that state in "time", and explains how
29 to get there.
31 Normally a commit would identify a new "HEAD" state, and while git
32 doesn't care where you save the note about that state, in practice we
33 tend 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
35 state was.
37 OPTIONS
38 -------
39 <tree>::
40         An existing tree object
42 -p <parent commit>::
43         Each '-p' indicates the id of a parent commit object.
46 Commit Information
47 ------------------
49 A commit encapsulates:
51 - all parent object ids
52 - author name, email and date
53 - committer name and email and the commit time.
55 While parent object ids are provided on the command line, author and
56 committer information is taken from the following environment variables,
57 if set:
59         GIT_AUTHOR_NAME
60         GIT_AUTHOR_EMAIL
61         GIT_AUTHOR_DATE
62         GIT_COMMITTER_NAME
63         GIT_COMMITTER_EMAIL
64         GIT_COMMITTER_DATE
65         EMAIL
67 (nb "<", ">" and "\n"s are stripped)
69 In case (some of) these environment variables are not set, the information
70 is taken from the configuration items user.name and user.email, or, if not
71 present, system user name and the hostname used for outgoing mail (taken
72 from `/etc/mailname` and falling back to the fully qualified hostname when
73 that file does not exist).
75 A commit comment is read from stdin. If a changelog
76 entry is not provided via "<" redirection, 'git commit-tree' will just wait
77 for one to be entered and terminated with ^D.
79 include::date-formats.txt[]
81 Diagnostics
82 -----------
83 You don't exist. Go away!::
84     The passwd(5) gecos field couldn't be read
85 Your parents must have hated you!::
86     The passwd(5) gecos field is longer than a giant static buffer.
87 Your sysadmin must hate you!::
88     The passwd(5) name field is longer than a giant static buffer.
90 Discussion
91 ----------
93 include::i18n.txt[]
95 FILES
96 -----
97 /etc/mailname
99 SEE ALSO
100 --------
101 linkgit:git-write-tree[1]
105 Part of the linkgit:git[1] suite