简体   繁体   中英

How do i undo the hg pull and update?

I am working in branch A and am using eclipse mercurial plugin to manage version control.Mistakely while pulling and updating the changes from the remote repository I pulled and updated changes of all the branches of my project.Now my branch A has changes of other branches say B , C , D .. as well.

I go-ogled and found out that hg rollback is likely the solution however I am not sure.

How do i undo my last pull and update? Any suggestion would be appreciated.

For a direct hands on How to revert a Mercurial hg pull? . Also look the Mercurial FAQ (7.13).

The hg update is never a problem, just do hg update YOUR_LOVED_REVISION_NUMBER and your working directory is again with all your stuff, and only your stuff.

Assuming you and only you works in the A branch, the hg pull is either a problem, just other's work in other's branches in your backstaged Mercurial internal history. If you like your history (DAG) clean then you may hg strip those annoying branches in your local repository.

Assuming the A branch is co-worked, then the hg pull just imported the other's work to your local copy of the project.

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