How to undo a pull
Dustin Sallings
dustin at spy.net
Fri Aug 31 00:03:36 CDT 2007
On Aug 30, 2007, at 20:54, Imbeault, Jean-Christian wrote:
> I've just done a pull and realised that I don't want the change.
> How do
> I undo the pull?
>
> I'm trying to push some changes to a central repository but I'm
> getting
> a 'creates new branches!' error and I'm guessing this is because of
> the
> bad pull?
If you updated, update to the revision you want and strip the ones
afterwards.
For example, if 41781010a224 is the bad changeset, and
``5f85e9f739f1'' is what you want to be working on:
hg up 5f85e9f739f1 # Set your working tree version.
hg strip 41781010a224 # Remove everything including and after this
revision
Note that if you think you may eventually want that changeset, you
can go ahead and work from the revision to which you updated and
it'll just branch of from there. You can later merge it in.
--
Dustin Sallings
More information about the Mercurial
mailing list