Search code examples
mercurialhg-revert

Refetching a locally deleted file from Mercurial


I deleted one of the files that was in my repository locally (just at the file system level, not using hg remove). I now want to get that file back from the repository to my local directory. When I do hg status, it knows that the file is locally deleted, but there are no changes to be commited which is what I would expect.


Solution

  • $ hg revert your-file
    

    will restore it.

    Edit: see http://www.selenic.com/mercurial/hg.1.html#revert