How to: Ignore all files in a directory (folder) with subversion

The ignore command for subversion can be confusing. Ignoring certain files types is pretty easy:

$ svn propset svn:ignore "*.log" log

but ignoring folders is tricky and was giving me headaches for a while. I was using file_column (in Rails) to save uploaded photos and whenever I did a svn status I would get a list of all my test uploads:

?      public/photo/filename/106
?      public/photo/filename/116
?      public/photo/filename/126
?      public/photo/filename/117
?      public/photo/filename/127
?      public/photo/filename/128
?      public/photo/filename/129

Which made it hard to find files I wanted to add. Here’s how to ignore a directory:

svn propset svn:ignore "*" public/photo/
This entry was posted in svn. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

3 Comments

  1. Posted February 5, 2008 at 6:26 am | Permalink

    Thank you very much. You made my day

  2. Gaurav
    Posted March 25, 2008 at 4:14 am | Permalink

    Thanks buddy.. it help me lot.

  3. James
    Posted November 19, 2008 at 12:45 pm | Permalink

    Thanks! I’ve been trying to do this for ages and this is the first thing I’ve tried that actually worked :D !

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word