How to revert a Mercurial hg pull?

前端 未结 5 1827
孤独总比滥情好
孤独总比滥情好 2021-02-13 14:46

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 pri

5条回答
  •  梦谈多话
    2021-02-13 15:49

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

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

    Also see:

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

    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. ...

提交回复
热议问题