git - hg 相当于 git revert

标签 git mercurial dvcs

我在公共(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/

相关文章:

git - 如何让 atlassian bamboo 从提交后 Hook 自动触发构建

mercurial - 如何在没有 PuTTY 的情况下从命令行使用 TortoiseHg (Pageant)

version-control - 带有 Mercurial 源代码控制的 TFS

git - 为什么 git log 不显示移动文件的历史记录,我该怎么办?

java - 未显示货架选项卡时如何恢复 Intellij 中搁置的更改?

git - GitFlow 工作流程中是否允许直接提交到 master 分支?

android - 在不更改代码的情况下显示在 android studio 中创建的 bitbucket 上的新分支

GIT:从远程服务器推送到远程

windows - tortoisehg 工作台 : convert extension is disabled

git - 多平台项目存储库设计策略