I use Subversion for all of my projects. While it's a life-saver for keeping records of all changes to your source code, it can be more than a little annoying to deal with the ubiquitous ".svn" folders that get put into every directory of your project. If you want to create a zip archive to publish your project, you don't want to publish those .svn folders along with it-- but up until now I haven't known of any other way to get rid of them other than to go into the zip file and delete the unwanted folders one by one. But today I found out that there's a better way (at least on Windows) by creating a new registry entry.
From John Galloway's blog:
[This] REG file adds "Delete SVN Folders" to the context menu for folders. When you select it, it removes all folders named .svn inside the folder and it's children (it does nothing if the project's not under Subversion source control.
John doesn't tell you how to get the new registry entry imported into your own registry, but I will: just copy the lines from his blog and save them in a text file with a ".reg" extension. Then open RegEdit, choose File -> Import..., and then import the file.

Comments (8)
December 21, 2007
16:24PM | #
Similar oneliner for unix/mac, this deletes all .svn subfolders in current folder:
rm -rf `find . -type d -name .svn`
December 21, 2007
18:12PM | #
If you use Eclipse, you can export a project into an archive file and it'll magically take care of stripping .svn folders and such. Just right click on the folder/project and select 'Export...'.
December 21, 2007
18:16PM | #
To publish your project without the svn folders, you can use the SVN Export function to export your project into a new folder and then zip that one.
My 2 cents :)
December 21, 2007
19:00PM | #
You can export your branch using your svn client and it will save a copy without all the .svn folders
I use TortoiseSVN. and I can simply right click on my folder and say export, select my output folder and done.
December 22, 2007
00:09AM | #
Tom, I suggest using svns built in component for exporting your project. The export creates a clean copy without the svn dir.
svn export
Additionally, the folder is a hidden folder. If you do not show hidden folders, then the folder disappears.
December 22, 2007
07:09AM | #
What about just exporting out of the repository? That will pull everything without the .svn folders.
February 7, 2008
18:06PM | #
on *nix try this:
tar jcvf project-v.v-svn.tar.bz2 --exclude=*.svn project-folder-name
April 27, 2008
12:56PM | #
If you're using zip under Linux, using the -x or "exclude" option is helpful. For example:
zip -9r RelDeployment/RelSource.zip Rel3DBrowser Rel3Shared Rel3Client Rel3Server Rel3Test Rel3Test -x@RelDeployment/exclude.lst
Where exclude.lst contains:
*.settings
*.project
*/*.svn/*
*.class
*.jdb
*.id
*.lck
*.jar