Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I override svn:ignore for individual directories?

Tags:

svn

svnignore

The default global ignore for Subversion does a good job of keeping build artifacts out of version control. What if I need to distribute a directory of compiled code for my stuff to build?

I don't want to pick up my output (in, say, /target), and I want to continue ignoring all compiled code for most of my other projects, but just one directory (say, /input) needs to always track files with a .a extension.

Is there a property I can set on the /input directory that will make svn add pick up new .a files in there, without altering the global-ignores property?

like image 907
Coderer Avatar asked Oct 18 '11 15:10

Coderer


1 Answers

The svn:ignore setting is a per-directory property. It applies to a given directory, and adds to rather than overrides the global-ignores setting. See Ignoring Unversioned Items in the SVN book.

I would say you have two viable options:

  1. Don't include *.a in the global-ignores setting, but rather only set it in the svn:ignore property on directories where such files tend to appear, such as /target.
  2. Keep *.a in the global-ignores setting, and manually call svn add on each of the .a files you wish to track. Once they are tracked by SVN, the ignore setting will no longer apply to them.
like image 149
Avi Avatar answered Oct 17 '22 04:10

Avi