[英]How to undo the effects of one commit in Mercurial, while keeping succesive commits?
While developing one web application, I made one tiny change in one commit, and then proceeded further. 在开发一个Web应用程序时,我在一次提交中做了一个微小的更改,然后继续进行。 Today My repo has moved on quite far down the line.
今天,我的仓库已经走得很远了。 I want to the undo the changes made in that particular commit, while keeping the changes made in the successive commits.
我想撤消在特定提交中所做的更改,同时保留在连续提交中所做的更改。
How do I do this in Mercurial? 如何在Mercurial中做到这一点?
Example: Suppose in commit 96, I changed a boolean variable which was true to false. 示例:假设在提交96中,我将一个布尔变量更改为true到false。
Today my repository is at Rev 678. I want to undo only those changes made in commit 96. 今天,我的存储库位于678版。我只想撤消在提交96中所做的那些更改。
How do I do this? 我该怎么做呢?
hg strip
| hg strip
删除变更集| hg histedit
(-1 changeset in history) hg histedit
(历史记录为-1个变更集) or 要么
hg backout
(+1 changeset in history, which undo changes from wrong changeset) hg backout
变更集(历史记录中的+1变更集,可从错误的变更集撤消更改)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.