simpatico
simpatico

Reputation: 11087

How to hg forget what .hgignore lists?

I've tracked files I no longer want to track. So I've updated .hgignore but that doesn't result in them being forgotten. Other than manually hg forget each do I have other options?

Upvotes: 4

Views: 1060

Answers (2)

bilash.saha
bilash.saha

Reputation: 7296

I dont think there is another option.

You have already checked these files into Mercurial.After hg forget the .hgignore file will take effect and prevent them from being added again. More precisely, the .hgignore file will make hg status stop showing the files as untracked

Tracked files are never affected by the .hgignore file. Well hg addremove could help you. Take a look here.

Upvotes: 1

Martin Geisler
Martin Geisler

Reputation: 73748

With Mercurial 2.0, you can specify a fileset for this! To forget the ignored files, use:

$ hg forget "set:hgignore() and not ignored()"

Upvotes: 7

Related Questions