1git-commit-tree(1) 2================== 3 4NAME 5---- 6git-commit-tree - Create a new commit object 7 8 9SYNOPSIS 10-------- 11'git commit-tree' <tree> [-p <parent commit>]* < changelog 12 13DESCRIPTION 14----------- 15This is usually not what an end user wants to run directly. See 16linkgit:git-commit[1] instead. 17 18Creates a new commit object based on the provided tree object and 19emits the new commit object id on stdout. 20 21A commit object may have any number of parents. With exactly one 22parent, it is an ordinary commit. Having more than one parent makes 23the commit a merge between several lines of history. Initial (root) 24commits have no parents. 25 26While a tree represents a particular directory state of a working 27directory, a commit represents that state in "time", and explains how 28to get there. 29 30Normally a commit would identify a new "HEAD" state, and while git 31doesn't care where you save the note about that state, in practice we 32tend 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 34state was. 35 36OPTIONS 37------- 38<tree>:: 39 An existing tree object 40 41-p <parent commit>:: 42 Each '-p' indicates the id of a parent commit object. 43 44 45Commit Information 46------------------ 47 48A commit encapsulates: 49 50- all parent object ids 51- author name, email and date 52- committer name and email and the commit time. 53 54While parent object ids are provided on the command line, author and 55committer information is taken from the following environment variables, 56if set: 57 58 GIT_AUTHOR_NAME 59 GIT_AUTHOR_EMAIL 60 GIT_AUTHOR_DATE 61 GIT_COMMITTER_NAME 62 GIT_COMMITTER_EMAIL 63 GIT_COMMITTER_DATE 64 EMAIL 65 66(nb "<", ">" and "\n"s are stripped) 67 68In case (some of) these environment variables are not set, the information 69is taken from the configuration items user.name and user.email, or, if not 70present, system user name and fully qualified hostname. 71 72A commit comment is read from stdin. If a changelog 73entry is not provided via "<" redirection, 'git commit-tree' will just wait 74for one to be entered and terminated with ^D. 75 76include::date-formats.txt[] 77 78Diagnostics 79----------- 80You don't exist. Go away!:: 81 The passwd(5) gecos field couldn't be read 82Your parents must have hated you!:: 83 The passwd(5) gecos field is longer than a giant static buffer. 84Your sysadmin must hate you!:: 85 The passwd(5) name field is longer than a giant static buffer. 86 87Discussion 88---------- 89 90include::i18n.txt[] 91 92SEE ALSO 93-------- 94linkgit:git-write-tree[1] 95 96 97Author 98------ 99Written by Linus Torvalds <torvalds@osdl.org> 100 101Documentation 102-------------- 103Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. 104 105GIT 106--- 107Part of the linkgit:git[1] suite