You are viewing a read-only archive of the Blogs.Harvard network. Learn more.

SVN ignoring Git

The first thing I had to deal with was ignoring multiple files in one directory. I’ve always known

svn propset svn:ignore something.txt .

But if you then

svn propset svn:ignore something_else.txt .

it will lose the first ignore. The way to do multiple ignores is annoying:

svn propset svn:ignore "something.txt
> something_else.txt" .

It requires the “s and you have to separate the files with a newline. That’s silly.

So the right way seems to be with an svn ignore file. I created a file “.svnignore”:


(it doesn’t have to be called .svnignore, that just keeps it straight with me exactly what it is)

Then the following command needs to be run:

svn -R propset svn:ignore -F .svnignore .

and this will recursively run through every directory in “.” and ignore every pattern in the file. The only issue is any time new directories are added that contain git (i.e. submodules) the command will have to be re-run.