How can I recover a removed file in Mercurial (if at all)?

后端 未结 9 855
有刺的猬
有刺的猬 2020-12-23 08:38

Accidentally, by using a GUI as opposed to CLI, I removed every file in a Mercurial project.

I recovered with Revert ok and lost some work, which as I have time mach

9条回答
  •  长情又很酷
    2020-12-23 09:32

    Quote from comment:

    I set up a repository, committed all, Removed and then committed again

    If this is the case then you just need to update the working directory to the previous revision:

    $ hg update -C -r-2
    

    Note the negative revision number. If the files you deleted aren't in the previous revision, you can find them by using:

    $ hg log -v
    

提交回复
热议问题