]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-commit.txt
Documentation: be consistent about "git-" versus "git "
[thirdparty/git.git] / Documentation / git-commit.txt
index c3c9f5b9021e60f815d41a0454b0238865251175..c351424b3fe534f0dbe62dd82ea2ea8633dcdb4f 100644 (file)
@@ -8,9 +8,9 @@ git-commit - Record changes to the repository
 SYNOPSIS
 --------
 [verse]
-'git-commit' [-a | --interactive] [-s] [-v] [-u]
-          [(-c | -C) <commit> | -F <file> | -m <msg> | --amend]
-          [--allow-empty] [--no-verify] [-e] [--author <author>]
+'git commit' [-a | --interactive] [-s] [-v] [-u<mode>] [--amend]
+          [(-c | -C) <commit>] [-F <file> | -m <msg>]
+          [--allow-empty] [--no-verify] [-e] [--author=<author>]
           [--cleanup=<mode>] [--] [[-i | -o ]<file>...]
 
 DESCRIPTION
@@ -52,42 +52,52 @@ that, you can recover from it with linkgit:git-reset[1].
 
 OPTIONS
 -------
--a|--all::
+-a::
+--all::
        Tell the command to automatically stage files that have
        been modified and deleted, but new files you have not
        told git about are not affected.
 
--c or -C <commit>::
-       Take existing commit object, and reuse the log message
+-C <commit>::
+--reuse-message=<commit>::
+       Take an existing commit object, and reuse the log message
        and the authorship information (including the timestamp)
-       when creating the commit.  With '-C', the editor is not
-       invoked; with '-c' the user can further edit the commit
-       message.
+       when creating the commit.
+
+-c <commit>::
+--reedit-message=<commit>::
+       Like '-C', but with '-c' the editor is invoked, so that
+       the user can further edit the commit message.
 
 -F <file>::
+--file=<file>::
        Take the commit message from the given file.  Use '-' to
        read the message from the standard input.
 
---author <author>::
+--author=<author>::
        Override the author name used in the commit.  Use
        `A U Thor <author@example.com>` format.
 
--m <msg>|--message=<msg>::
+-m <msg>::
+--message=<msg>::
        Use the given <msg> as the commit message.
 
--t <file>|--template=<file>::
+-t <file>::
+--template=<file>::
        Use the contents of the given file as the initial version
        of the commit message. The editor is invoked and you can
        make subsequent changes. If a message is specified using
        the `-m` or `-F` options, this option has no effect. This
        overrides the `commit.template` configuration variable.
 
--s|--signoff::
+-s::
+--signoff::
        Add Signed-off-by line at the end of the commit message.
 
+-n::
 --no-verify::
        This option bypasses the pre-commit and commit-msg hooks.
-       See also linkgit:githooks[5][hooks].
+       See also linkgit:githooks[5].
 
 --allow-empty::
        Usually recording a commit that has the exact same tree as its
@@ -105,14 +115,14 @@ OPTIONS
        'whitespace' removes just leading/trailing whitespace lines
        and 'strip' removes both whitespace and commentary.
 
--e|--edit::
+-e::
+--edit::
        The message taken from file with `-F`, command line with
        `-m`, and from file with `-C` are usually used as the
        commit log message unmodified.  This option lets you
        further edit the message taken from these sources.
 
 --amend::
-
        Used to amend the tip of the current branch. Prepare the tree
        object you would want to replace the latest commit as usual
        (this includes the usual -i/-o and explicit paths), and the
@@ -133,13 +143,15 @@ It is a rough equivalent for:
 but can be used to amend a merge commit.
 --
 
--i|--include::
+-i::
+--include::
        Before making a commit out of staged contents so far,
        stage the contents of paths given on the command line
        as well.  This is usually not what you want unless you
        are concluding a conflicted merge.
 
--o|--only::
+-o::
+--only::
        Make a commit only from the paths specified on the
        command line, disregarding any contents that have been
        staged so far. This is the default mode of operation of
@@ -150,20 +162,32 @@ but can be used to amend a merge commit.
        the last commit without committing changes that have
        already been staged.
 
--u|--untracked-files::
-       Show all untracked files, also those in uninteresting
-       directories, in the "Untracked files:" section of commit
-       message template.  Without this option only its name and
-       a trailing slash are displayed for each untracked
-       directory.
+-u[<mode>]::
+--untracked-files[=<mode>]::
+       Show untracked files (Default: 'all').
++
+The mode parameter is optional, and is used to specify
+the handling of untracked files. The possible options are:
++
+--
+       - 'no'     - Show no untracked files
+       - 'normal' - Shows untracked files and directories
+       - 'all'    - Also shows individual files in untracked directories.
+--
++
+See linkgit:git-config[1] for configuration variable
+used to change the default for when the option is not
+specified.
 
--v|--verbose::
+-v::
+--verbose::
        Show unified diff between the HEAD commit and what
        would be committed at the bottom of the commit message
        template.  Note that this diff output doesn't have its
        lines prefixed with '#'.
 
--q|--quiet::
+-q::
+--quiet::
        Suppress commit summary message.
 
 \--::
@@ -183,7 +207,7 @@ When recording your own work, the contents of modified files in
 your working tree are temporarily stored to a staging area
 called the "index" with linkgit:git-add[1].  A file can be
 reverted back, only in the index but not in the working tree,
-to that of the last commit with `git-reset HEAD -- <file>`,
+to that of the last commit with `git reset HEAD -- <file>`,
 which effectively reverts `git-add` and prevents the changes to
 this file from participating in the next commit.  After building
 the state to be committed incrementally with these commands,
@@ -292,7 +316,7 @@ order).
 HOOKS
 -----
 This command can run `commit-msg`, `prepare-commit-msg`, `pre-commit`,
-and `post-commit` hooks.  See linkgit:githooks[5][hooks] for more
+and `post-commit` hooks.  See linkgit:githooks[5] for more
 information.
 
 
@@ -312,4 +336,4 @@ Junio C Hamano <junkio@cox.net>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite