mercurialtortoisehghgignore

TortoiseHg: Delete files that are ignored


I'm using TortoiseHg for mercurial repositories. Of course, I exclude directories, such as

Over time, when I open solutions from the repository, these directories get created by Visual Studio. I want to get rid of them because I also keep backups of my hard drive and these directories increase its size, especially the C++ sdf-file!

enter image description here

What I've tried

I tried the purge extension. But this apparently seems to just delete empty directories and has nothing to do with the .hgignore file.

Question: How can I delete all files that are covered by .hgignore?


Solution

  • hg purge deletes untracked files. hg purge --all deletes ignored files as well. Since an ignored directory ignores all the files under it, it will delete that directory.