How to recursively remove .svn metadata folders?

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 ?


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