SVN is a great tool, and having it work the way you want is even better. I don't want SVN to pay attention to things like my Rails log files and other artifacts.

There is a simple way to have SVN behave, and have it applied globally to all of your SVN working copies. Just edit the SVN config file located at ~/.subversion/config. Find the "global-ignores" part, and edit it as shown below:

global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .project *.log database.yml ruby_sess* schema.rb

The default file patterns file patterns are common file artifacts that you would want to avoid like compilation products, backup files, and the like. The patterns .project *.log database.yml ruby_sess* schema.rb ignore any RadRails/Eclipse project files, log files (Rails log files), and Rails database configuration files, ruby session state files, and Rails database schema dump files, respectively.

Since you can use pattern matching, you can get pretty creative with how you ignore files. Or, you can always just individual files without using patterns at all. Once you save this file, your changes instantly effective.

1 Response to “Set SVN to ignore certain files or patterns”

  1. Jon Says:

    Am i missing something? the files i want to ignore are of the type .*, eg .index.html, i tried adding that to the list with no luck. So my questions, why dont you ignore them? and why cant i ignore them?

Sorry, comments are closed for this article.