views:

261

answers:

2

Hi!

I am using TortoiseHG for source code control in Windows, I forgot to edit the ".hgignor" file, and now I have a huge folder ".hg" which I know it's because of DLL and EXE and PDB files which I do not need them. Now changing the ignor file does not remove those files.

What should I do for deleting these files completely from my TortoiseHg data source?

Thank you.

+3  A: 

You can use the hg remove command to remove files in your repository. If you are using TortoiseHG, you can right click on the file and go: TortoiseHG -> Remove File.

Check out the "How to stop tracking a file" section Here.

Jason
Thanks very much. this command also deletes the file from hard drive, what should I do if I want to keep them?
Hossein Margani
+4  A: 

if you want to stop tracking files, but leave them in working directory, use hg forget. Help also says you can achieve the same effect by using hg remove -Af.

I'm not sure what do you mean by «data source», but neither of those will remove the files from repository itself, because they are already a part of your history, and thus their previous versions will remain there. Forgetting them will only prevent your history from bloating even further with newer versions of those build artifacts.

d.Candela