Browse Source

Documentation: clarify how "git commit" cleans up the edited log message

The `-v` shows a unified diff in the editor to edit the commit
message to help the user to describe the change.  The diff is
stripped and will not become a part of the commit message.

Add a note about this with the `-v` description and slightly modify
the description for the default `--cleanup` mode.

Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Fredrik Gustafsson 10 years ago committed by Junio C Hamano
parent
commit
9a35c14d64
  1. 11
      Documentation/git-commit.txt

11
Documentation/git-commit.txt

@ -180,8 +180,8 @@ OPTIONS
+ +
-- --
strip:: strip::
Strip leading and trailing empty lines, trailing whitespace, and Strip leading and trailing empty lines, trailing whitespace,
#commentary and collapse consecutive empty lines. commentary and collapse consecutive empty lines.
whitespace:: whitespace::
Same as `strip` except #commentary is not removed. Same as `strip` except #commentary is not removed.
verbatim:: verbatim::
@ -282,8 +282,11 @@ configuration variable documented in linkgit:git-config[1].
--verbose:: --verbose::
Show unified diff between the HEAD commit and what Show unified diff between the HEAD commit and what
would be committed at the bottom of the commit message would be committed at the bottom of the commit message
template. Note that this diff output doesn't have its template to help the user describe the commit by reminding
lines prefixed with '#'. what changes the commit has.
Note that this diff output doesn't have its
lines prefixed with '#'. This diff will not be a part
of the commit message.
+ +
If specified twice, show in addition the unified diff between If specified twice, show in addition the unified diff between
what would be committed and the worktree files, i.e. the unstaged what would be committed and the worktree files, i.e. the unstaged

Loading…
Cancel
Save