Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you add all untracked files in svn? Something like git add -i?

I've been using this long command:

svn st | awk '/\?/ {print $2}' | xargs svn add

Similarly, to svn rm files I accidentally deleted with normal rm with :

svn st | awk '/\!/ {print $2}' | xargs svn rm --force

I guess I can write a bash function to do these two, but I'd prefer an interactive add/rm like the one git has.

like image 552
user13200 Avatar asked Oct 01 '08 22:10

user13200


1 Answers

This adds all svn-untracked and -unversioned files in the current directory, recursing through all subdirectories:

svn add --force ./*

Works for me in MacOS 10.6+ and Ubuntu 10+, with svn 1.6+. This does not provide any per-file, user-interactivity; I don't know how to do that.

This will also add svn-ignored files, for better or worse.

like image 70
Johnny Utahh Avatar answered Oct 02 '22 08:10

Johnny Utahh