我在公共(public)存储库上有一个提交。我希望这个提交不存在(我已经把那个工作移到了一个分支),我显然不想破坏分支历史,基本上只是做一个与那个提交相反的事情。在 git 中,这只是 git revert
,但我没有使用 git :)
最佳答案
hg 退出
hg backout [OPTION]... [-r] REV
reverse effect of earlier changeset
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.
关于git - hg 相当于 git revert,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4587372/