'\" t .\" Title: git-commit-tree .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 02/22/2023 .\" Manual: Git Manual .\" Source: Git 2.30.2 .\" Language: English .\" .TH "GIT\-COMMIT\-TREE" "1" "02/22/2023" "Git 2\&.30\&.2" "Git Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" git-commit-tree \- Create a new commit object .SH "SYNOPSIS" .sp .nf \fIgit commit\-tree\fR [(\-p )\&...] \fIgit commit\-tree\fR [(\-p )\&...] [\-S[]] [(\-m )\&...] [(\-F )\&...] .fi .sp .SH "DESCRIPTION" .sp This is usually not what an end user wants to run directly\&. See \fBgit-commit\fR(1) instead\&. .sp Creates a new commit object based on the provided tree object and emits the new commit object id on stdout\&. The log message is read from the standard input, unless \fB\-m\fR or \fB\-F\fR options are given\&. .sp The \fB\-m\fR and \fB\-F\fR options can be given any number of times, in any order\&. The commit log message will be composed in the order in which the options are given\&. .sp A commit object may have any number of parents\&. With exactly one parent, it is an ordinary commit\&. Having more than one parent makes the commit a merge between several lines of history\&. Initial (root) commits have no parents\&. .sp While a tree represents a particular directory state of a working directory, a commit represents that state in "time", and explains how to get there\&. .sp Normally a commit would identify a new "HEAD" state, and while Git doesn\(cqt care where you save the note about that state, in practice we tend to just write the result to the file that is pointed at by \fB\&.git/HEAD\fR, so that we can always see what the last committed state was\&. .SH "OPTIONS" .PP .RS 4 An existing tree object\&. .RE .PP \-p .RS 4 Each \fB\-p\fR indicates the id of a parent commit object\&. .RE .PP \-m .RS 4 A paragraph in the commit log message\&. This can be given more than once and each becomes its own paragraph\&. .RE .PP \-F .RS 4 Read the commit log message from the given file\&. Use \fB\-\fR to read from the standard input\&. This can be given more than once and the content of each file becomes its own paragraph\&. .RE .PP \-S[], \-\-gpg\-sign[=], \-\-no\-gpg\-sign .RS 4 GPG\-sign commits\&. The \fBkeyid\fR argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space\&. \fB\-\-no\-gpg\-sign\fR is useful to countermand a \fB\-\-gpg\-sign\fR option given earlier on the command line\&. .RE .SH "COMMIT INFORMATION" .sp A commit encapsulates: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} all parent object ids .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} author name, email and date .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} committer name and email and the commit time\&. .RE .sp A commit comment is read from stdin\&. If a changelog entry is not provided via "<" redirection, \fIgit commit\-tree\fR will just wait for one to be entered and terminated with ^D\&. .SH "DATE FORMATS" .sp The \fBGIT_AUTHOR_DATE\fR, \fBGIT_COMMITTER_DATE\fR environment variables support the following date formats: .PP Git internal format .RS 4 It is \fB