Skip to content

Commit 788e98f

Browse files
committed
Merge branch 'cn/commit-amend-doc' into maint
* cn/commit-amend-doc: Documentation/git-commit: reword the --amend explanation
2 parents 23589a9 + aa7b8c6 commit 788e98f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Documentation/git-commit.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,15 @@ variable (see linkgit:git-config[1]).
207207
without changing its commit message.
208208

209209
--amend::
210-
Used to amend the tip of the current branch. Prepare the tree
211-
object you would want to replace the latest commit as usual
212-
(this includes the usual -i/-o and explicit paths), and the
213-
commit log editor is seeded with the commit message from the
214-
tip of the current branch. The commit you create replaces the
215-
current tip -- if it was a merge, it will have the parents of
216-
the current tip as parents -- so the current top commit is
217-
discarded.
210+
Replace the tip of the current branch by creating a new
211+
commit. The recorded tree is prepared as usual (including
212+
the effect of the `-i` and `-o` options and explicit
213+
pathspec), and the message from the original commit is used
214+
as the starting point, instead of an empty message, when no
215+
other message is specified from the command line via options
216+
such as `-m`, `-F`, `-c`, etc. The new commit has the same
217+
parents and author as the current one (the `--reset-author`
218+
option can countermand this).
218219
+
219220
--
220221
It is a rough equivalent for:

0 commit comments

Comments
 (0)