I 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

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
 

One Response to Helpful SVN Script For Adding all Unknown files to Repository

  1. Stableboy says:

    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!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>