Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing .svn files from all directories [duplicate]

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?

like image 447
Mike2012 Avatar asked Aug 19 '09 16:08

Mike2012


People also ask

How do I delete a .SVN file?

To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…

How do I delete a .SVN file in Windows?

Right click on the project, go to Team->disconnect. It will open a popup where you select the first option: 'Also delete the SVN meta-information from file system. ' This will remove all the SVN folders automatically along with svn property files that you might forget sometimes while removing .

How do I delete a .SVN folder recursively?

The find command returns a list of all the subfolders matching “. svn”, and this is then piped to the rm command to recursively delete the directory. Running rm using the full path will remove the confirmation prompt, and the “rf” arguments will recursively delete any folder contents.


1 Answers

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 
like image 135
Charles Finkel Avatar answered Oct 02 '22 07:10

Charles Finkel