The Linux Page

Hide sub-folders with Subversion

It is often that I want to hide a sub-folder so whenever I do an svn status I don't actually see that sub-folder in my list of files that are not available in the repository. It is otherwise quite annoying to see that folder again and again.

The command to do so uses a property on the parent folder as follow:

  svn propset svn:ignore sub-folder parent-folder

So for instance, if you auto-generate a sub-folder named 'documents' with the documentation of your project named 'MyProject', you probably don't want it in your Subversion repository (since it is generated.)

So you could do the following:

  svn propset svn:ignore documents MyProject

As you can see it is reversed and you don't actually pass the full path of the directory you want to hide. Always somewhat confusing, although quite logical.