I've got some files in a repo that I don't want tracked, is it possible to remove them without removing the actual files from the filesystem?

This would be equivalent to git's rm --cached.

link|improve this question
feedback

3 Answers

up vote 3 down vote accepted

You can use hg forget <file> if files have just been added, however if the files have already been committed use hg rm --after <file>.

The help is a bit misleading, it should be hg rm --do-not-touch-the-filesystem.

link|improve this answer
feedback

It looks like hg forget is what I was looking for according to this.

This will mark a file so that it is no longer tracked after the next commit.

link|improve this answer
feedback

I believe you can simply ignore them by placing them in a .hgignore file in the folder.

http://www.selenic.com/mercurial/hgignore.5.html

link|improve this answer
I've ignored them but they're already tracked in the repo and have changes so are showing up. – ghickman Jan 17 '11 at 16:05
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.