How to recursively remove .svn metadata folders?
24,334
Solution 1
You will have to move to desire folder using cd
command then write following command:
find -type d -name '.svn' -exec rm -rfv {} \;
This will remove the all svn
files from current and sub-directories.
Solution 2
Another way of doing the same is:
rm -rf `find . -type d -name .svn`
Solution 3
If it's still connected to svn just do svn export
and it will copy the project with no svn metadata:)
Solution 4
For Windows :
- either use UnxUtils http://unxutils.sourceforge.net/ with the previous answers
- or use the search (F3) in explorer with ".svn" as the file name, it also worked for me
Related videos on Youtube
Author by
radu c
Updated on September 18, 2022Comments
-
radu c over 1 year
I have a Java project and it used a SVN repository, now I decide to change to GIT.
However the problem is that SVN engine that I used created in every folder of the project the
.svn
metadata directory.I want to clean all folders of the project of this hidden folder.
Is there any terminal command to search in folder and clean it ?
-
Steven about 13 yearsI wish Windows (I have has this same issue on that platform) had solutions that were this clean and easy :(
-
Chakra about 13 yearsThere may be some script in Powershell, but I don't use Windows anymore ;-)
-
enzotib about 13 yearsThis fails for directories with spaces in the name
-
enzotib about 13 yearsThis is dangerous, when some dir can contain spaces in his name
-
nanofarad almost 12 yearsYes. Beware of spaces!