SVN ignore

Mar. 7, 2007 No Comments Posted under: Development

I keep on forgetting how to create an SVN ignore file to SVN. So in an attempt to remember I though I would blog it, and hey it may even help someone else.

First off you need to create a file with any files you want to SVN to ignore in:

You can do this in Terminal or just create it in a text editor. With no whitespace add a file on each line you want to ignore. In my case it was config.php, as the config changes for each server I check my code out on. Then save this as .svnignore. The . before the file name will make the file hidden.

Next you need to tell SVN to use this file. This can be done by typing:


svn propset svn:ignore -F .svnignore .

This tells SVN to use .svnignore and therefore ignore all the files listed in it.

Finally we need to add it to SVN


svn add .svnignore

Job’s a gooden

This entry was posted on Wednesday, March 7th, 2007 at 1:20 pm and is filed under Development. You can leave a comment and follow any responses to this entry through the RSS 2.0 feed.

Leave a Reply