SVN: Ignore subfolders

Mark Steudel picture Mark Steudel · Feb 3, 2011 · Viewed 22.3k times · Source

I have a folder say: /user_files, which I want to include in SVN, but there are additional folders underneath it which I don't want to include.

Is there a way to use svn:ignore to ignore anything in a folder even if that parent folder is included in the repos?

Answer

Arnaud Le Blanc picture Arnaud Le Blanc · Feb 3, 2011

Use this to ignore everything in the user_files directory:

svn propset svn:ignore '*' user_files

This sets the svn:ignore property to * on the user_files directory, which effectively causes svn to ignore every untracked file in this directory.

Then you have to commit the directory on which you set the property, and update other working copies.