Monday, April 11, 2011

What's the best way to remove all .svn directories throughout a directory hierarchy on Mac OS X?

Is there a command that would be useful?

From stackoverflow
  • Just do an export from the subversion repository.

  • find . -name .svn  -type d -print0 |xargs -0 rm -rf
    
    Jonathan Leffler : Add -type d just to be sure you don't remove files named .svn?
    Paul Tomblin : Ok, fair enough, I've added the -type d.
  • For systems that support it:

    find . -name .svn -delete
    

    or, if they don't support the -delete switch:

    find . -name .svn -exec rm -rf {} \;
    
  • In the root of the working copy folder, do

    svn export --force .
    

0 comments:

Post a Comment