Skip to content

Instantly share code, notes, and snippets.

@DennisXie
Last active November 23, 2018 08:58
Show Gist options
  • Save DennisXie/34ac1fa72e08bcc222df5eec383c9b76 to your computer and use it in GitHub Desktop.
Save DennisXie/34ac1fa72e08bcc222df5eec383c9b76 to your computer and use it in GitHub Desktop.
revert a commited merge
git log查看最近的提交
commit 8f937c683929b08379097828c8a04350b9b8e183
Merge: 8989ee0 7c6b236
Author: Ben James <ben@example.com>
Date: Wed Aug 17 22:49:41 2011 +0100
git revert 8f937c -m 8989ee0
其中-m用于指定父分支,Merge字段中的提交按1, 2 来编号
#ref https://stackoverflow.com/questions/7099833/how-to-revert-a-merge-commit-thats-already-pushed-to-remote-branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment