Subversion setup for Rails

Subversion global properties

You can have subversion ignore a set of files by specifying their names (with wildcards) in its global configuration file, /etc/subversion/config. Note that if subversion is already versioning a file or directory, it will continue to do so, ignoring any mention of it in the list.

My global config contains the following:

[miscellany]
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store ._* *.log *.swp *.tmp sessions sockets cache pids apidoc appdoc

See Rails Subversion TNG - Setting up Subversion.

For information about Subversion advanced configuration, see Chapter 7. Advanced Topics from the online Subversion book.

Remove versioned files

If, as mentioned above, subversion is already versioning some of the files you wish to exclude, you will need to remove them from version control before setting properties to prevent them being versioned again. You will have to do this for every directory that you wish not to be versioned, e.g. tmp, tmp/sessions, tmp/sockets, etc.

For example, to remove the logs from versioning, do the following:

svn remove log/*
svn commit -m 'removing all log files from subversion'
svn propset svn:ignore "*.log" log/
svn update log/
svn commit -m 'Ignoring all files in /log/ ending in .log'

See Subversion + Rails In Five Minutes.

Last modified: 19/04/2007 Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top