git.rst
changeset 2116 f92d8941f4a8
parent 2115 0263a79eeb3b
child 2122 24fbab64cf91
equal deleted inserted replaced
2115:0263a79eeb3b 2116:f92d8941f4a8
   217 Add alias::
   217 Add alias::
   218 
   218 
   219   [alias]
   219   [alias]
   220   glog = log --all --graph
   220   glog = log --all --graph
   221 
   221 
   222 Git analog of 'hg rollback'.
   222 Git analog of 'hg rollback'
   223 ============================
   223 ===========================
   224 
   224 
   225 To edit commit message of last commit::
   225 To edit commit message of last commit::
   226 
   226 
   227   $ git commit --amend -m "$MSG"
   227   $ git commit --amend -m "$MSG"
       
   228 
       
   229 To integrate changes into last commit (``-a`` to avoid antecedent ``git add ...``,
       
   230 ``--no-edit`` if you don't like to change commit message, otherwise external
       
   231 editor is opened)::
       
   232 
       
   233   $ git commit -a --amend --no-edit
   228 
   234 
   229 To edit messages of old commits starting from ``$REV``::
   235 To edit messages of old commits starting from ``$REV``::
   230 
   236 
   231   $ git rebase -i $REV
   237   $ git rebase -i $REV
   232 
   238