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