Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 337
David Avatar asked Jul 15 '10 16:07

David


People also ask

How to ignore files in Tortoise SVN?

If you right click on a single unversioned file, and select the command TortoiseSVN → Add to Ignore List from the context menu, a submenu appears allowing you to select just that file, or all files with the same extension. Both submenus also have a (recursively) equivalent.

How do I ignore target folder in svn?

To ignore files in subversion you want to set the svn:ignore property. You can see more here http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html about half way down. svn propset svn:ignore target . svn propedit svn:ignore .


2 Answers

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.

like image 78
the_mandrill Avatar answered Oct 22 '22 08:10

the_mandrill


Set the svn:ignore property to "bin" and "obj" for the parent folder, provided the parent folder is under version control.

  • Right-click the parent folder in Explorer
  • Choose TortoiseSVN -> Properties
  • Choose the svn:ignore property from the "Property name" drop-down
  • Add "bin" and "obj" to the "Property value" field, separating them by line breaks.
  • Commit the parent folder only
  • The child folders should show up with a grey "ignored" icon from then on.
like image 33
Unicron Avatar answered Oct 22 '22 07:10

Unicron