Telling Subversion to Ignore a Directory

I just ran into a subversion headache, telling subversion to ignore a a directory.  Telling subversion to ignore a directory is painless (in my case the directory is tmp):

$ svn propset svn:ignore tmp .

$ svn commit –m “ignoring directory tmp”

If you have more than one directory or file to ignore, edit the svn:ignore property:

$ svn propedit svn:ignore .

Don’t use svn add *

On the command line if you use svn add *, it will also add the ignored files, because the command line expands the asterisk (*) and therefore svn add believes you want to all all of the files to be added.

Therein was my headache.  I would add all of the files to the pending commit to catch all of the changes, but the ignored directory would get thrown in.

The proper way to do this is to use this instead:

$ svn add --force .

This entry was posted in Subversion. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s