Subversion Ignore tutuorial

Ignoring files in subversion I think is totally un-user friendly so I have written a tutorial to try and explain how it works.

Firstly you need to set the default text editor for subversion. To do this you need to set the SVN_EDITOR enviroment variable which is just a one liner in terminal. I am a nano fan so mine was:

export SVN_EDITOR=nano

Now you are ready to start adding ignore exceptions, you can only do this however on the directory that holds the file you want to ignore. There is no inheritance so don’t put an ignore on root and expect it to filter to all directories. So CD to the directory that holds the files. eg.

cd ./config

To add ignore properies to the directory do.

svn propedit svn:ignore .

Now in nano you can add the ignores, so type in the files and wild cards you want separated by a carriage return.


database.php
config.php
*.jpg

Then if you do an svn status the ? should have dropped off the list.