Ignoring files in Subversion and deployments

Sometimes it is useful to ignore files or directories when working with Subversion or deploying files to your server. Good examples include log files, media directories, and user contributed data. When it comes to source control, it is usually wise not to include these items.

Subversion has a nice property called ignore that can be used just for this purpose. When applying this property to a file, it will remove it from version control and not include it in future commits. There are even options to do this globally.

For deployments this has a special function. If you ignore some data in your working copy, it will not deploy these files to the server when you initiate a new deployment. This is useful if you want to avoid overwriting config files or logs.

Most Subversion clients support this feature. For further reading, have a look at these sites:

Blog post: http://sdesmedt.wordpress.com/2006/12/10/how-to-make-subversion-ign...
SVN Book: http://svnbook.red-bean.com/nightly/en/svn.advanced.props.special.i...

Still need help? Contact Us Contact Us