Ignoring resource fork files files with subversion

If you’ve ever edited files over samba, or on a fat partition, using a mac, you’ll know that it scatters annoying ._foo.txt files all over the place when you save things. These files are the system’s way of compensating for these filesystems not supporting ‘real’ resource forks, and they’re a complete pain. I feel this pain especially when I’m trying to see what’s changed in a subversion checkout using svn st, and it produces 30 lines of ? ._foo.pl complaints.

Fortunately, subversion allows you to ignore this stuff. Edit the file ~/.subversion/config (which is created the first time you use the subversion client), and search for the ‘miscellany’ section. Uncomment the line [miscellany] if it’s not already, and also uncomment the line beginning global-ignores. This line is a list of glob patterns for files that should be ignored when doing a svn st, or svn add (if you svn add on a folder, it won’t add any backup files in the folder, for instance). Add the pattern ._* to the end of it, and your resource fork woes are over…