tags:

views:

74

answers:

1

I accidentally did a hg pull and it created a branch in my local repo.

What is the simplest to undo that and get my local repo back to previous state?

+3  A: 

hg rollback but beware the caveats:

This command should be used with care. There is only one level of rollback, and there is no way to undo a rollback. It will also restore the dirstate at the time of the last transaction, losing any dirstate changes since that time. This command does not alter the working directory.
...

msw
+1. Didn't know that rollback would do that for multiple pulled changesets.
Niall C.
Too easy! I new `hg rollback` but thought it only worked to undo `hg commit`. RTM :)
Sly