Skip to content

Commit 9a35c14

Browse files
iveqygitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 564705c commit 9a35c14

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Documentation/git-commit.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ OPTIONS
180180
+
181181
--
182182
strip::
183-
Strip leading and trailing empty lines, trailing whitespace, and
184-
#commentary and collapse consecutive empty lines.
183+
Strip leading and trailing empty lines, trailing whitespace,
184+
commentary and collapse consecutive empty lines.
185185
whitespace::
186186
Same as `strip` except #commentary is not removed.
187187
verbatim::
@@ -282,8 +282,11 @@ configuration variable documented in linkgit:git-config[1].
282282
--verbose::
283283
Show unified diff between the HEAD commit and what
284284
would be committed at the bottom of the commit message
285-
template. Note that this diff output doesn't have its
286-
lines prefixed with '#'.
285+
template to help the user describe the commit by reminding
286+
what changes the commit has.
287+
Note that this diff output doesn't have its
288+
lines prefixed with '#'. This diff will not be a part
289+
of the commit message.
287290
+
288291
If specified twice, show in addition the unified diff between
289292
what would be committed and the worktree files, i.e. the unstaged

0 commit comments

Comments
 (0)