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