Remove untracked files in Mercurial
It happens after wild act of creation that we notice we went wrong way. Quick decision is made: "go back and start over". With VCS it is plain simple, just type hg revert and you're at home. Almost. Unsurprisingly, hg revert reverts only modifications and leaves new files intact.
There is simple solution for that: and there's again nice, but obscure feature that is included in the box, but just not activated. Let's edit the .hgrc in your home directory, and make sure there is something like this:
[extensions] purge =
and once it is, just type
hg purge
to send unwanted files to /dev/null.
Polski
English




