How to remove a merged commit in a branch

This question already has an answer here:

  • Undo a Git merge that hasn't been pushed yet 25 answers

  • Try git revert HASH where HASH is the hash of the commit your want to remove.

    Essentially, git revert makes a new commit that exactly cancels out the previous commit. I know this works on commits in the same branch, and I would assume it would work perfectly fine on a merge commit.

    链接地址: http://www.djcxy.com/p/16972.html

    上一篇: GitHub恢复或重置?

    下一篇: 如何删除分支中的合并提交