Removing .svn files from all directories


Question

Possible Duplicate:
How do you remove Subversion control for a folder?
Command line to delete matching files and directories recursively

I recently converted my cvs repository to svn using cvs2svn and I recently noticed that every directory has a hidden folder called .svn. My current build script copies a lot of directories from my versioned resources directories and it ends up copying the .svn files. Is there anyway to make svn not include these files when I checkout or do I need to write a script to delete all these .svn files. There are many files that have these hidden .svn directories so this would be a pain unless I could write a recursive script to do this but I don't if I can do this for my windows installer. Is there an easy way to stop svn from putting this hidden directory everywhere in my project?

1
33
5/23/2017 12:30:31 PM

Accepted Answer

You can do a thing called an SVN Export to get the files without the .svn directories

http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.export.html

28
5/29/2014 9:16:18 AM

I'm not sure in your specific case that you want to remove all those .svn directories. But if you do, here is a bash one-liner to do just that:

find . -name .svn -print0 | xargs -0 rm -r

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon