Avatar

Auto add all new files to SVN

written by Matthew Sital-Singh, on Jun 12, 2008 3:59:00 PM.

If you've added a bunch of changes to a local SVN copy, in a bunch of different places, then try running this little beauty:

svn stat | grep '^?' | awk '{print $2}' | xargs svn add

Basically, it checks the status, searches the results for lines beginning in '?' (files svn doesn't know about yet), strips off the ? char, leaving the filename, and then whacks them all into svn add.

Woot.

Be sure to run an 'svn stat' before calling this to make sure that you don't have any files lying about that you *DON'T* want added, as this command will just add them AAALL.

Comments