Saturday, May 8, 2010

How to recursively add new files to SVN

The following shell script will add all the files appear as "?" in "svn status", even if the folder or filename contains space:

svn status | grep "^\?" | sed -e 's/? *//' | sed -e 's/ /\\ /g' | xargs svn add

Be cautious that everything in your build folder will also be marked as 'A', so you might want to delete that folder before you run this script.

No comments:

Post a Comment