path: root/Documentation/git-commit.txt
diff options
authorbrian m. carlson <>2020-01-22 03:45:39 (GMT)
committerJunio C Hamano <>2020-01-22 20:27:08 (GMT)
commitbc94e5862aed854c77d4f96da9447161ce84a824 (patch)
tree7c21ed638be798037601ebdc59df0d6098ef3150 /Documentation/git-commit.txt
parent232378479ee6c66206d47a9be175e3a39682aea6 (diff)
doc: move author and committer information to git-commit(1)
While at one time it made perfect sense to store information about configuring author and committer information in the documentation for git commit-tree, in modern Git that operation is seldom used. Most users will use git commit and expect to find comprehensive documentation about its use in the manual page for that command. Considering that there is significant confusion about how one is to use the and variables, let's put as much documentation as possible into an obvious place where users will be more likely to find it. In addition, expand the environment variables section to describe their use more fully. Even though we now describe all of the options there and in the configuration settings documentation, preserve the existing text in git-commit.txt so that people can easily reason about the ordering of the various options they can use. Explain the use of the author.* and committer.* options as well. Signed-off-by: brian m. carlson <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-commit.txt')
1 files changed, 24 insertions, 3 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index ced5a9b..30c30cc 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -367,9 +367,6 @@ changes to tracked files.
For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
-:git-commit: 1
When recording your own work, the contents of modified files in
@@ -463,6 +460,30 @@ alter the order the changes are committed, because the merge
should be recorded as a single commit. In fact, the command
refuses to run when given pathnames (but see `-i` option).
+Author and committer information is taken from the following environment
+variables, if set:
+(nb "<", ">" and "\n"s are stripped)
+In case (some of) these environment variables are not set, the information
+is taken from the configuration items `` and ``, or, if not
+present, the environment variable EMAIL, or, if that is not set,
+system user name and the hostname used for outgoing mail (taken
+from `/etc/mailname` and falling back to the fully qualified hostname when
+that file does not exist).
+:git-commit: 1