Subversion Recursive Add

The default behavior for subversion when adding files is to stop when it sees a directory it has already added. This can be a pain if you have added a file to a directory that is already added. You can force subversion to add any files you have not added by the following command.

svn add --force ./*

This will add the entire directory recursively even your config files so make sure you have set svn:ingore up correctly. I use a global ignore in the svn config to tell subversion to ignore config files because I support many web sites.

sudo nano /Users/colin/.subversion/config

Then add the name of your config file to then line starting global-ignores, this line may be commented out with a hash. Mine looks like:

global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store Config.php

One thought on “Subversion Recursive Add

  1. Thank you very much, I don’t understand why this common scenario doesn’t exist in the official documentation.

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>