简体   繁体   中英

How to undo `hg pull`?

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM