hg相当于git revert

时间:2011-01-03 19:00:26

标签: git mercurial dvcs

我有一个公共存储库的提交。我希望这个提交不在那里(我把这个工作转移到了一个分支),我显然不想破坏分支历史,基本上只是执行该提交的反转。在git中这只是git revert,但我没有使用git:)

1 个答案:

答案 0 :(得分:16)

hg backout

  

hg backout [OPTION] ... [ - r] REV

     

早期变更集的反向效果

Commit the backed out changes as a new changeset. The new
changeset is a child of the backed out changeset.

If you backout a changeset other than the tip, a new head is
created. This head will be the new tip and you should merge this
backout changeset with another head.