HG下的git revert等价命令是什么?

14

我在一个公共代码库中有一个提交记录。我希望这个提交记录不再存在(我已经将该工作移动到一个分支),但我显然不想破坏分支历史记录,基本上只是要对该提交进行反向操作。在Git中,这只需要使用git revert 命令即可,但我没有使用Git :)

1个回答

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.

有没有办法使这个程序与通过 hg commit --amend 创建的修订版本一起工作?我收到了这个错误消息:“中止:无法撤消不是祖先的更改”。 - Dan

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接