Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN: Recursive add

Tags:

svn

I am trying add new project files in a SVN folder from my working copy freshly. Its asking an option "Recursive" with a message "Are you sure you want to add * many items?" . Could someone guide me what is the use of this "Recursive" option to enable? Should i have enable it when i'm freshly adding new project files or not?

Thank you.

like image 475
Daisy Avatar asked Nov 30 '12 09:11

Daisy


People also ask

Can multiple files be added in svn?

Edit These files exist in a directory tree so adding * for one directory will not work. @your edit: So then provide multiple paths to add like: svn add dir1/* dir2/* dir3/* or as many have mentioned grep the ouput of svn stat from the root and pipe it to cut or awk and then to add.

What is svn add?

Adding a File or DirectoryTo add an existing file to a Subversion repository and put it under revision control, change to the directory with its working copy and run the following command: svn add file… Similarly, to add a directory and all files that are in it, type: svn add directory…

How do I add a folder to svn repository?

Right Click the new repo and choose SVN Repo Browser. Right click 'trunk' Choose ADD Folder... and point to your folder structure of your project in development. Click OK and SVN will ADD your folder structure in.


1 Answers

Short version: svn add * --force is all you need

Long version: According to svn add manual page

Normally, the command svn add * will skip over any directories that are already under version control. Sometimes, however, you may want to add every unversioned object in your working copy, including those hiding deeper down. Passing the --force option makes svn add recurse into versioned directories:

$ svn add * --force A         foo.c A         somedir/bar.c A         otherdir/docs/baz.doc 
like image 120
Even Cheng Avatar answered Sep 20 '22 01:09

Even Cheng