Adding files recursively to svn for an already added directory

A simple set of commands that’s very effective and potentially allowed me to save about a half an hour of manual file adding for my friend Thilanga.

Scenario: He had a set of files (around 100+) that were in different directories of an already added directory (referred to as root).
Go to the root directory of the change and just type this command and you are done.
$ svn st | grep ? | tr -s ‘ ‘ | cut -f2 -d ‘ ‘ | xargs svn add
PS: obviously I’m in a Linux environment. 🙂

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 )

Google+ photo

You are commenting using your Google+ 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