Quick tip: Easily remove .svn and .gitignore
I’ve reinstalled my system a few days ago and upgraded all ports on my Mac.
Set up the new SVN server, created new repositories to store and keep my applications under version control. I’ve restored my folder from Time Machine which included the old .svn folders. Of course I wanted to remove all those ones before I import them to my new repository, so after some “googling” I’ve figured out how to do this from Terminal in the most efficient way.
Rather than going to each folder and delete all the old .svn folders and all the junk which had been left from my previous install, I managed to remove all these with one single command:
sudo find ~/Sites/myapp/ -name ".svn" -depth -exec rm -rf {} \;
If you are hardcore enough, you can also delete .DS_Store and .gitignore files too:
sudo find ~/Sites/myapp/ -name ".svn" -o -name ".DS_Store" -o -name ".gitignore" -depth -exec rm -rf {} \;
Article which helped me finding this method: find at dmiessler.com
Now you have a clean folder structure so you can start importing your application to your SVN repository