Is there any way to delete local commits in Mercurial?

后端 未结 10 1060
小鲜肉
小鲜肉 2020-11-28 19:11

So I keep making a silly mistake in Mercurial. Often times, I\'ll start work without doing an \"hg pull\" and an \"hg update.\" When I try to push my changes, I get an err

10条回答
  •  无人及你
    2020-11-28 19:49

    If you are using Hg Tortoise just activate the extension "strip" in:

    1. File/Settings/Extensions/
    2. Select strip

    Then select the bottom revision from where you want to start striping, by doing right click on it, and selecting:

    1. Modify history
    2. Strip

    Just like this:

    enter image description here

    In this example it will erase from the 19th revision to the last one commited(22).

提交回复
热议问题