Add files to SVN recursively via command line

Search files in subdirectories and add them to SVN recursively

svn status | grep "^\?" | awk '{print $2}' | xargs svn add

Tags:

6 comments

6
Dec

Thanks

Thanks, did the trick for me.

7
Nov

Simplier

Try this: svn add --force DIR/*

27
Jul

Spaces cause issues

Thanks for the command. I tried it and it works great except when I was trying to process directories and filenames with spaces.

I made a couple of minor alterations to your command and came up with the following.

svn status | grep "^\?" | sed 's/^\? \+//' | sed 's/ /\\ /' | xargs svn add

Cheers

15
Dec

Requesting unix command

In unix, how to delete and copy subversion .svn folders?

22
Mar

you may try this one: find .

you may try this one:

find . -name '.svn' | xargs rm -rf

6
Jan

sudo rm -R .svn

sudo rm -R .svn