commit doc: document that -c, -C, -F and --fixup with -m error
[gitweb.git] / Documentation / git-commit.txt
index f2ab0ee2e7d1ff0f79c09cbd27e745f5f08d139d..3fbb7352bc77840a29d9955430f1ff9ceba7f9a0 100644 (file)
@@ -95,7 +95,7 @@ OPTIONS
 
 --reset-author::
        When used with -C/-c/--amend options, or when committing after a
-       conflicting cherry-pick, declare that the authorship of the
+       conflicting cherry-pick, declare that the authorship of the
        resulting commit now belongs to the committer. This also renews
        the author timestamp.
 
@@ -112,14 +112,17 @@ OPTIONS
        `--dry-run`.
 
 --long::
-       When doing a dry-run, give the output in the long-format.
+       When doing a dry-run, give the output in the long-format.
        Implies `--dry-run`.
 
 -z::
 --null::
-       When showing `short` or `porcelain` status output, terminate
-       entries in the status output with NUL, instead of LF. If no
-       format is given, implies the `--porcelain` output format.
+       When showing `short` or `porcelain` status output, print the
+       filename verbatim and terminate the entries with NUL, instead of LF.
+       If no format is given, implies the `--porcelain` output format.
+       Without the `-z` option, filenames with "unusual" characters are
+       quoted as explained for the configuration variable `core.quotePath`
+       (see linkgit:git-config[1]).
 
 -F <file>::
 --file=<file>::
@@ -141,6 +144,9 @@ OPTIONS
        Use the given <msg> as the commit message.
        If multiple `-m` options are given, their values are
        concatenated as separate paragraphs.
++
+The `-m` option is mutually exclusive with `-c`, `-C`, `-F`, and
+`--fixup`.
 
 -t <file>::
 --template=<file>::
@@ -193,11 +199,12 @@ whitespace::
 verbatim::
        Do not change the message at all.
 scissors::
-       Same as `whitespace`, except that everything from (and
-       including) the line
-       "`# ------------------------ >8 ------------------------`"
-       is truncated if the message is to be edited. "`#`" can be
-       customized with core.commentChar.
+       Same as `whitespace` except that everything from (and including)
+       the line found below is truncated, if the message is to be edited.
+       "`#`" can be customized with core.commentChar.
+
+               # ------------------------ >8 ------------------------
+
 default::
        Same as `strip` if the message is to be edited.
        Otherwise `whitespace`.
@@ -265,7 +272,8 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)
        If this option is specified together with `--amend`, then
        no paths need to be specified, which can be used to amend
        the last commit without committing changes that have
-       already been staged.
+       already been staged. If used together with `--allow-empty`
+       paths are also not required, and an empty commit will be created.
 
 -u[<mode>]::
 --untracked-files[=<mode>]::
@@ -459,7 +467,7 @@ order).  See linkgit:git-var[1] for details.
 HOOKS
 -----
 This command can run `commit-msg`, `prepare-commit-msg`, `pre-commit`,
-and `post-commit` hooks.  See linkgit:githooks[5] for more
+`post-commit` and `post-rewrite` hooks.  See linkgit:githooks[5] for more
 information.
 
 FILES