Documentation / git-commit-tree.txton commit parse-options: multi-word argh should use dash to separate words (e703d71)
   1git-commit-tree(1)
   2==================
   3
   4NAME
   5----
   6git-commit-tree - Create a new commit object
   7
   8
   9SYNOPSIS
  10--------
  11[verse]
  12'git commit-tree' <tree> [(-p <parent>)...] < changelog
  13'git commit-tree' [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...]
  14                  [(-F <file>)...] <tree>
  15
  16
  17DESCRIPTION
  18-----------
  19This is usually not what an end user wants to run directly.  See
  20linkgit:git-commit[1] instead.
  21
  22Creates a new commit object based on the provided tree object and
  23emits the new commit object id on stdout. The log message is read
  24from the standard input, unless `-m` or `-F` options are given.
  25
  26A commit object may have any number of parents. With exactly one
  27parent, it is an ordinary commit. Having more than one parent makes
  28the commit a merge between several lines of history. Initial (root)
  29commits have no parents.
  30
  31While a tree represents a particular directory state of a working
  32directory, a commit represents that state in "time", and explains how
  33to get there.
  34
  35Normally a commit would identify a new "HEAD" state, and while Git
  36doesn't care where you save the note about that state, in practice we
  37tend to just write the result to the file that is pointed at by
  38`.git/HEAD`, so that we can always see what the last committed
  39state was.
  40
  41OPTIONS
  42-------
  43<tree>::
  44        An existing tree object
  45
  46-p <parent>::
  47        Each '-p' indicates the id of a parent commit object.
  48
  49-m <message>::
  50        A paragraph in the commit log message. This can be given more than
  51        once and each <message> becomes its own paragraph.
  52
  53-F <file>::
  54        Read the commit log message from the given file. Use `-` to read
  55        from the standard input.
  56
  57-S[<keyid>]::
  58--gpg-sign[=<keyid>]::
  59        GPG-sign commit.
  60
  61--no-gpg-sign::
  62        Countermand `commit.gpgsign` configuration variable that is
  63        set to force each and every commit to be signed.
  64
  65
  66Commit Information
  67------------------
  68
  69A commit encapsulates:
  70
  71- all parent object ids
  72- author name, email and date
  73- committer name and email and the commit time.
  74
  75While parent object ids are provided on the command line, author and
  76committer information is taken from the following environment variables,
  77if set:
  78
  79        GIT_AUTHOR_NAME
  80        GIT_AUTHOR_EMAIL
  81        GIT_AUTHOR_DATE
  82        GIT_COMMITTER_NAME
  83        GIT_COMMITTER_EMAIL
  84        GIT_COMMITTER_DATE
  85
  86(nb "<", ">" and "\n"s are stripped)
  87
  88In case (some of) these environment variables are not set, the information
  89is taken from the configuration items user.name and user.email, or, if not
  90present, the environment variable EMAIL, or, if that is not set,
  91system user name and the hostname used for outgoing mail (taken
  92from `/etc/mailname` and falling back to the fully qualified hostname when
  93that file does not exist).
  94
  95A commit comment is read from stdin. If a changelog
  96entry is not provided via "<" redirection, 'git commit-tree' will just wait
  97for one to be entered and terminated with ^D.
  98
  99include::date-formats.txt[]
 100
 101Discussion
 102----------
 103
 104include::i18n.txt[]
 105
 106FILES
 107-----
 108/etc/mailname
 109
 110SEE ALSO
 111--------
 112linkgit:git-write-tree[1]
 113
 114GIT
 115---
 116Part of the linkgit:git[1] suite