Documentation / git-commit-tree.txton commit Merge branch 'maint-1.7.7' into maint-1.7.8 (e521850)
   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 the hostname used for outgoing mail (taken
  72from `/etc/mailname` and falling back to the fully qualified hostname when
  73that file does not exist).
  74
  75A commit comment is read from stdin. If a changelog
  76entry is not provided via "<" redirection, 'git commit-tree' will just wait
  77for one to be entered and terminated with ^D.
  78
  79include::date-formats.txt[]
  80
  81Diagnostics
  82-----------
  83You don't exist. Go away!::
  84    The passwd(5) gecos field couldn't be read
  85Your parents must have hated you!::
  86    The passwd(5) gecos field is longer than a giant static buffer.
  87Your sysadmin must hate you!::
  88    The passwd(5) name field is longer than a giant static buffer.
  89
  90Discussion
  91----------
  92
  93include::i18n.txt[]
  94
  95FILES
  96-----
  97/etc/mailname
  98
  99SEE ALSO
 100--------
 101linkgit:git-write-tree[1]
 102
 103GIT
 104---
 105Part of the linkgit:git[1] suite