Recursively Add New Files to SVN

One great thing about running Windows is TortoiseSVN. I makes managing my SVN so easy. One of the problems I’ve ran into on other systems was I had been working for several hours. I would have dozens of new files and with TortoiseSVN it would show me a list of all the new files and I could hit “select all” and commit. However, on Mac I haven’t found an SVN client that I like, so I just use the terminal commands. There are also times, like when managing a WordPress installation, that WordPress and its plug-ins could auto update. I wanted to be able to add all the new files on the linux server back into the svn.

I never could figure out how to do it until I read a comment at a blog post:

svn st --ignore-externals | grep ^? | sed 's/?/svn add/' | sh

Man, shell is just awesome. This is better than the first suggestion of using “svn add –force *” because it would add ignored files as well. Hope this helps someone and makes them happy like I am now!

1 thought on “Recursively Add New Files to SVN

  1. Try smartSVN, this allows to select the unversioned files (of course, from subdirectories, too) and invoke add.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close