Howto (prop)set SVN:ignore from the command-line !?
Posted: January 13th, 2009 | Author: Mihai Bojin | Filed under: General, PHP, Troubleshooting, Web | Tags: command line, developer, DS_Store, guide, ignore, propset, repository, subversion, svn, svn:ignore, tutorial |If you’re a developer you’ve probably worked with SVN.
And if you’ve worked with SVN you’ve probably had the problem that it’s commiting and updating more than you want.
So here’s a quick way to ignore the files you dislike:
- If you want to ignore just a file, for example "config.php" from the "config" directory:
svn propset svn:ignore "config.php" /path/to/config
- If you want to ignore all the files in a directory, for example the "cache" directory:
svn propset svn:ignore "*" /path/to/cache
(quick warning here ! "*" is different from "*.*"; the latter implies that you have files or directories with extensions and it will not match a file/dir with no extension)
- If you’re an Apple Fanboy like me than this one’s for you; MacOS has the annoying habbit of creating .DS_Store files in every directory, including those under SVN
edit "~/.subversion/config" with your favorite editor (vi, nano or even TextEdit)
search for the line that contains "global-ignores" and add ".DS_Store" at the end of the row
save it and you’re done; no more .DS_Store junk in your repository !
I hope this quick guide helps you. I’ve written this because most so called coders out there use tools like TortoiseSVN and have no clue how to use SVN from the command line.
If you have other usefull SVN command-line tips, please share them in the comments !











Leave a Reply