Setting SVN:Ignore on the command line

One of the (only) things I miss in my move to the Mac is TortoiseSVN, a really nice Subversion client which integrates with the Windows shell giving you all the Subversion commands on a right click context menu. SCPlugin for OS X is coming along, and what they have is very nice, but they don’t have it all yet… still, good effort guys, thanks.

One function missing from SCPlugin, and from the Subversion bundle on Textmate, is the ability to easily set the SVN:Ignore property. Setting SVN:Ignore on a file or directory means that SVN will never bother you with trying to add or commit it. I’m always heading for the command line, then getting confused and failing to remember how to do the business… so for my benefit here it is (and embarassingly for my memory it’s actually quite easy):

svn propedit svn:ignore .

This will fire up your assigned editor (you could probably set it to Textmate, but I’m not sure how, so I haven’t), then enter your file patterns and you’re away. (The above command assumes you’re setting svn:ignore on objects in the current directory, otherwise just change the . at the end to a filepath to wherever.)

4 Responses to “Setting SVN:Ignore on the command line”


  1. 1 sameet

    export SVN_EDITOR=vi will set the editor to vi. For TextMate you can use SVN_EDITOR=mate

  2. 2 Simon

    Hi Sameet. Good tip about the SVN_EDITOR setting. Unfortunately TextMate doesn’t seem to work for me, I get the error “No changes to property ’svn:ignore’ on ‘.’” no matter what I do. (Emacs works fine though, and I assume vi would too if I were that way inclined.)

  3. 3 Graham Pengelly

    Hey Simon… fancy that. I’m on Google looking for this and you pop up. Nice one… Thanks.

  4. 4 simonwheatley

    Hi Graham, glad to be of service!

Leave a Reply