Tortoise - is it possible to ignore new folder before committing it?

David picture David · Jul 15, 2010 · Viewed 12.2k times · Source

I just added a class library project to my .NET solution. When I built it, it created the bin and obj folders, which I want to exclude from version control.

However, Tortoise won't let me ignore the folders before the first commit. It gives the following message.

Cannot add bin to the ignore list!

I have to check the whole lot in, and then choose Delete and add to ignore list for the two folders.

How do I prevent them being checked in at all, and ensure Tortoise knows to ignore them?

Answer

the_mandrill picture the_mandrill · Jul 15, 2010

It's because you haven't yet added their parent directories. Do 'add' on the new project directory first, and then when it gives you the dialog showing the list of files to add, untick bin and obj. You can then ignore them once the project directory has been added.

You could also add bin and obj to your global ignore list (in the TortoiseSVN prefs) though that will ignore any instances of bin across all your projects.