How to revert a Mercurial hg pull?

前端 未结 5 1819
孤独总比滥情好
孤独总比滥情好 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:51

    If you want to remove all traces of the pull form your history then you need to use an extension as Bert F suggests (the philosophy in mercurial is to never change history)

    if you dont mind history containing your mistake you have two slightly different options hg update -C -r which will create a new branch at the version you specify or hg revert -r which will stay on the same branch but create a new uncommited change undoing everything.

提交回复
热议问题