Howto recursively add unversioned files into SVN repository

Because svn add command does not support recursive addition of unversioned files you can use this little script to do it.
Create new file in /usr/local/bin with name svnadd with following content

#!/bin/sh
svn status | perl -ne 's/^\?\s+(\S.+)$/\1/g;chomp;system("svn add \"$_\"");'

Save it. From now on you can execute svnadd command in your working directory.

7 Comments

  1. Leo,
    Your command works perfectly well.
    Thanks, CMEY.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.