git-commit --amend

The new flag is used to amend the tip of the current branch.  Prepare
the tree object you would want to replace the latest commit as usual
(this includes the usual -i/-o and explicit paths), and the commit log
editor is seeded with the commit message from the tip of the current
branch.  The commit you create replaces the current tip -- if it was a
merge, it will have the parents of the current tip as parents -- so the
current top commit is discarded.

It is a rough equivalent for:

	$ git reset --soft HEAD^
	$ ... do something else to come up with the right tree ...
	$ git commit -c ORIG_HEAD

but can be used to amend a merge commit.

Signed-off-by: Junio C Hamano <junkio@cox.net>
1 file changed
tree: 8524e5abce51e9e029f3e0d1e9b33ad11951b309
  1. arm/
  2. compat/
  3. contrib/
  4. Documentation/
  5. mozilla-sha1/
  6. ppc/
  7. t/
  8. templates/
  9. .gitignore
  10. apply.c
  11. blob.c
  12. blob.h
  13. cache.h
  14. cat-file.c
  15. check-ref-format.c
  16. checkout-index.c
  17. clone-pack.c
  18. combine-diff.c
  19. commit-tree.c
  20. commit.c
  21. commit.h
  22. config.c
  23. connect.c
  24. convert-objects.c
  25. copy.c
  26. COPYING
  27. count-delta.c
  28. count-delta.h
  29. csum-file.c
  30. csum-file.h
  31. ctype.c
  32. daemon.c
  33. date.c
  34. delta.h
  35. describe.c
  36. diff-delta.c
  37. diff-files.c
  38. diff-index.c
  39. diff-stages.c
  40. diff-tree.c
  41. diff.c
  42. diff.h
  43. diffcore-break.c
  44. diffcore-delta.c
  45. diffcore-order.c
  46. diffcore-pathspec.c
  47. diffcore-pickaxe.c
  48. diffcore-rename.c
  49. diffcore.h
  50. entry.c
  51. environment.c
  52. epoch.c
  53. epoch.h
  54. exec_cmd.c
  55. exec_cmd.h
  56. fetch-clone.c
  57. fetch-pack.c
  58. fetch.c
  59. fetch.h
  60. fsck-objects.c
  61. get-tar-commit-id.c
  62. git-add.sh
  63. git-am.sh
  64. git-annotate.perl
  65. git-applymbox.sh
  66. git-applypatch.sh
  67. git-archimport.perl
  68. git-bisect.sh
  69. git-branch.sh
  70. git-checkout.sh
  71. git-cherry.sh
  72. git-clone.sh
  73. git-commit.sh
  74. git-compat-util.h
  75. git-count-objects.sh
  76. git-cvsexportcommit.perl
  77. git-cvsimport.perl
  78. git-cvsserver.perl
  79. git-diff.sh
  80. git-fetch.sh
  81. git-fmt-merge-msg.perl
  82. git-format-patch.sh
  83. git-grep.sh
  84. git-log.sh
  85. git-lost-found.sh
  86. git-ls-remote.sh
  87. git-merge-octopus.sh
  88. git-merge-one-file.sh
  89. git-merge-ours.sh
  90. git-merge-recursive.py
  91. git-merge-resolve.sh
  92. git-merge-stupid.sh
  93. git-merge.sh
  94. git-mv.perl
  95. git-parse-remote.sh
  96. git-prune.sh
  97. git-pull.sh
  98. git-push.sh
  99. git-rebase.sh
  100. git-relink.perl
  101. git-repack.sh
  102. git-request-pull.sh
  103. git-rerere.perl
  104. git-reset.sh
  105. git-resolve.sh
  106. git-revert.sh
  107. git-rm.sh
  108. git-send-email.perl
  109. git-sh-setup.sh
  110. git-shortlog.perl
  111. git-svnimport.perl
  112. git-tag.sh
  113. git-verify-tag.sh
  114. GIT-VERSION-GEN
  115. git-whatchanged.sh
  116. git.c
  117. git.spec.in
  118. gitk
  119. gitMergeCommon.py
  120. hash-object.c
  121. http-fetch.c
  122. http-push.c
  123. http.c
  124. http.h
  125. ident.c
  126. index-pack.c
  127. index.c
  128. init-db.c
  129. INSTALL
  130. local-fetch.c
  131. ls-files.c
  132. ls-tree.c
  133. mailinfo.c
  134. mailsplit.c
  135. Makefile
  136. merge-base.c
  137. merge-index.c
  138. merge-tree.c
  139. mktag.c
  140. mktree.c
  141. name-rev.c
  142. object.c
  143. object.h
  144. pack-check.c
  145. pack-objects.c
  146. pack-redundant.c
  147. pack.h
  148. patch-delta.c
  149. patch-id.c
  150. path.c
  151. peek-remote.c
  152. pkt-line.c
  153. pkt-line.h
  154. prune-packed.c
  155. quote.c
  156. quote.h
  157. read-cache.c
  158. read-tree.c
  159. README
  160. receive-pack.c
  161. refs.c
  162. refs.h
  163. repo-config.c
  164. rev-list.c
  165. rev-parse.c
  166. rsh.c
  167. rsh.h
  168. run-command.c
  169. run-command.h
  170. send-pack.c
  171. server-info.c
  172. setup.c
  173. sha1_file.c
  174. sha1_name.c
  175. shell.c
  176. show-branch.c
  177. show-index.c
  178. ssh-fetch.c
  179. ssh-pull.c
  180. ssh-push.c
  181. ssh-upload.c
  182. strbuf.c
  183. strbuf.h
  184. stripspace.c
  185. symbolic-ref.c
  186. tag.c
  187. tag.h
  188. tar-tree.c
  189. test-date.c
  190. test-delta.c
  191. tree-diff.c
  192. tree.c
  193. tree.h
  194. unpack-file.c
  195. unpack-objects.c
  196. update-index.c
  197. update-ref.c
  198. update-server-info.c
  199. upload-pack.c
  200. usage.c
  201. var.c
  202. verify-pack.c
  203. write-tree.c