]> git.phdru.name Git - git-wiki.git/commitdiff
Explain git revert
authorOleg Broytman <phd@phdru.name>
Mon, 29 Jun 2015 21:59:42 +0000 (00:59 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 29 Jun 2015 21:59:42 +0000 (00:59 +0300)
pep-git.txt

index b2e30384b9a98d101ab50d50f9942428e497603d..d42184b4fbda81f396ef57356f5bb91e2caa3c2f 100644 (file)
@@ -482,8 +482,16 @@ do something like::
 git revert: revert a commit
 ---------------------------
 
-How to undo a merge
-https://www.kernel.org/pub/software/scm/git/docs/howto/revert-a-faulty-merge.html
+``git revert`` reverts a commit or commits, that is, it creates a new
+commit or commits that reverts the effects of the given commits. It's
+the only way to undo published commits (``git commit --amend``, ``git
+rebase`` and ``git reset`` change the branch in non-fast-forwardable
+ways so they should only be used for non-pushed commits.)
+
+There is a problem with reverting a merge commit. ``git revert`` can
+undo the code created by the merge commit but it cannot undo the fact
+of merge. See the discussion `How to revert a faulty merge
+<https://www.kernel.org/pub/software/scm/git/docs/howto/revert-a-faulty-merge.html>`_.
 
 One thing that cannot be undone
 -------------------------------