Helpful SVN Script For Adding all Unknown files to Repository
May 30, 2007 – 4:31 pmI use SVN from the command line a lot. I also hate typing things over and over. I wrote this script to add all files to a repository that are not already in there.
svn status | awk '{if ($1 == "?") print $2 }' | xargs svn add
I have this saved in my ~/bin folder as “addall”, which I’ve added to the $PATH variable, which gets set in ~/.bash_profile



One Response to “Helpful SVN Script For Adding all Unknown files to Repository”
Hey, Jon!
This is one case where having Windows is nice: TortoiseSVN shows you all the files which aren’t in the repository, and it’s a simple matter to select all or just some and add them in the Gui. But I’m stealing your script anyway for those cases where I’m mainly working in Cygwin!
Thanks!
By Stableboy on Jun 29, 2007