Documentation/git-commit: reword the --amend explanation
The explanation for 'git commit --amend' talks about preparing a tree object, which shouldn't be how user-facing documentation talks about commit. Reword it to say it works as usual, but replaces the current commit. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlos Martín Nieto committed
Apr 3, 2013 at 15:07 UTC
aa7b8c657e407a10cbee728264ec48be16ea4e3d
1 file changed
+9
-8
Documentation/git-commit.txt
+9
-8
@@ -190,14 +190,15 @@ OPTIONS
190
without changing its commit message.
191
192
--amend::
193
- Used to amend the tip of the current branch. Prepare the tree
194
- object you would want to replace the latest commit as usual
195
- (this includes the usual -i/-o and explicit paths), and the
196
- commit log editor is seeded with the commit message from the
197
- tip of the current branch. The commit you create replaces the
198
- current tip -- if it was a merge, it will have the parents of
199
- the current tip as parents -- so the current top commit is
200
- discarded.
193
+ Replace the tip of the current branch by creating a new
194
+ commit. The recorded tree is prepared as usual (including
195
+ the effect of the `-i` and `-o` options and explicit
196
+ pathspec), and the message from the original commit is used
197
+ as the starting point, instead of an empty message, when no
198
+ other message is specified from the command line via options
199
+ such as `-m`, `-F`, `-c`, etc. The new commit has the same
200
+ parents and author as the current one (the `--reset-author`
201
+ option can countermand this).
202
+
203
--
204
It is a rough equivalent for: