Removing .svn Folders from a Codebase

Removing the .svn folders from a codebase effectively removes the codes attachment to the repository. This can be useful for when you are trying to distribute the code to others or if you are trying to bring two different repositories together.

Anyway the proper way to do it is to use svn export. However this requires you to specify an export path and you end up with two copies of the codebase. Also the export method doesn't also export any changes you have made to the codebase that have not been committed. See the following link for more details on svn export.

http://svnbook.red-bean.com/en/1.1/re10.html

The easy way to do this is to use the following command.

find ./ -name ".svn" | xargs rm -rf

This will take the current directory and strip the .svn folder out. Be warned though this will also remove files named .svn, normally this should not be a problem.

I got most of this information from the link below.

http://cephas.net/blog/2007/04/06/command-line-script-to-delete-svn-files-folders/