svn add new files

working with svn, I've got a directory with say 100+ files in it, this case jpgs. lets say 70 of them are already in subversion, so when i do svn st it shows about 30 some that are not. You can run svn add *.jpg but that's ugly (though it does work)

instead setup an alias in *.bash_profile *

alias svn-add-all-new-files='svn st|grep ^?|sed s/?//|xargs svn add $1'

after that you'll need to run your .bash_profile or restart the terminal to make the settings stick

. ~/.bash_profile 

source: http://snippets.dzone.com/posts/show/4722

October 3rd, 2008 / Tags: shell, svn