Quick Tip: Erase .svn entries
Posted by Vince Wadhwani on Jun 05, 2008
There's no doubt that sometimes mistakes happen. If you make a terrible terrible subversion error and need to start over, rather than check in your code again, use this command to erase all the hidden .svn entries:
find . -type d -name '.svn' -print0 | xargs -0 rm -rdf
It's not perfect, but if svn export doesn't work and you've got no other choice the above command will help you out in a pinch.
or
find . -type d -name ‘.svn’ -exec rm -rf {} \;
Though I’m not sure why you would do that ever; why not just re-check out the repo.
Better yet, switch to Git where it’s much harder to screw things up :)
Dave
Hi Dave,
I didn’t mean to imply that this is the first alternative you should look at. Running svn export is the first choice and if you can check out again and remake your changes that’s also fine too. For all I know subversion may even be smart enough to ignore older subversion entries if you just blindly commit. The point is that this is a way.
Git is also a great version control system. I’m hoping to move a few projects over there shortly.
vince