Can Mercurial use .hgignore to forget files?

Viewed 4895

I forget to place the correct .hgignore into my project and am now confronted with many useless files in my repository. As these files are already under source control .hgignore will not pick em up.

Is there a way for hg to forget all files matched by .hgignore?

5 Answers

Idan K's solution is great. I added an alias to my global mercurial.ini because I can't remember the command.

[alias]
forgetignored = forget "set:hgignore() and not ignored()"
Related