如何恢复汞汞拉力? [英] How to revert a Mercurial hg pull?

查看:49
本文介绍了如何恢复汞汞拉力?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果先执行hg pull,然后再执行hg update(或hg merge),是否可以解决此问题?即:在执行hg pull之前将存储库恢复到状态?

If you do an hg pull and then an hg update (or an hg merge), is there a way to back this out? Ie: revert your repository to the state prior to doing the hg pull?

我相信您可以执行hg update -r n,在拉取之前将更改集指定为n.尽管我猜测这仍然会将更改集保留在您的存储库中,但这并不是我们真正想要的. ??

I believe you can do hg update -r n where you would specify the changeset prior to the pull as n. Though I'm guessing this will still leave the changesets in your repository but this isn't really what we want. ??

推荐答案

hg strip将从存储库中删除修订.像所有强大的命令一样,它很危险,所以要小心.

hg strip will remove revisions from a repository. Like all powerful commands, its dangerous, so be careful.

https://www.mercurial-scm.org/wiki/StripExtension

另请参阅:

https://www.mercurial-scm.org/wiki/EditingHistory

如果您立即(或相当快地)发现错误,则可以使用 汞带REV 来回滚最新(一个或多个)更改. ...

If you catch your mistake immediately (or reasonably soon), you can just use hg strip REV to roll back the latest (one or more) changes. ...

这篇关于如何恢复汞汞拉力?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆