Git amend.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 08 Mar 2017 16:31:24 +0200
changeset 2116 f92d8941f4a8
parent 2115 0263a79eeb3b
child 2117 22f21cc41569
Git amend.
git.rst
--- a/git.rst	Wed Mar 08 16:17:56 2017 +0200
+++ b/git.rst	Wed Mar 08 16:31:24 2017 +0200
@@ -219,13 +219,19 @@
   [alias]
   glog = log --all --graph
 
-Git analog of 'hg rollback'.
-============================
+Git analog of 'hg rollback'
+===========================
 
 To edit commit message of last commit::
 
   $ git commit --amend -m "$MSG"
 
+To integrate changes into last commit (``-a`` to avoid antecedent ``git add ...``,
+``--no-edit`` if you don't like to change commit message, otherwise external
+editor is opened)::
+
+  $ git commit -a --amend --no-edit
+
 To edit messages of old commits starting from ``$REV``::
 
   $ git rebase -i $REV