Add Files to Subversion Recursively

Adding a directory and sub-directories to your subversion repo: I’ve seen some wacky solutions to this problem online, and a lot of people don’t know this is a built-in command (Google “add files to subversion recursively”).

Since CodeFury has been getting pretty high in the Google listings, I’ll post the real command. Hopefully subversion users will find my blog before running someone else’s 50 line perl script.

And here it is:

svn add * -- force

It would really be scary to consider what would happen if subversion didn’t have this in it’s toolbox. Rails developers would be in tears any time they ran

script/generate [something]
# Generating n new files in n directories ... ;)

Of course, even that command isn’t as easy as git’s

git add .

I’ve been using git full force lately. I’m not entirely in agreement with Linus Torvalds’ quips on subversion, but I do agree that git is superior to svn in a lot of ways.

Anyway, I hope this post saves someone a lot of typing.

Share:
  • Slashdot
  • Digg
  • del.icio.us
  • NewsVine
  • Facebook
  • Google

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

No comments yet.

Leave a comment

(required)

(required)