14
votes

I have a folder, called "files". It's already in the repository. Now, new files are constantly added to this folder and it's subfolder. What command can I type to add all the files that have not yet been added. This does NOT work:

svn add files

It says

svn: warning: 'files' is already under version control

3

3 Answers

34
votes
svn add files/*

or:

svn add --force files

(taken from SVN book)

14
votes

If you'd like to add all files in a folder, including all subfolders, this is a really handy script:

svn status | awk '{if ($1 == "?") print $2 }' | xargs svn add
3
votes

If your all directories are not adding recursively. Then check this.

recursive adding is default property. You can see in SVN book.

Issue can be in your ignore list or global properties.

I got solution google issue tracker

  • Right click in your repo in window. Select TortoiseSVN > Properties.
  • See if you don't have a property svn:global-ignores with a value of *
  • If you have property with star(*) then it will ignore recursive adding. So remove this property.

This guy also explained why this property added in my project.

The most like way that it got there is that someone right-clicked a file without any extension and selected TortoiseSVN -> SVN Ignore -> * (recursively), and then committed this.

You can check the log to see who committed that property change, find out what they were actually trying to do, and ask them to be more careful in future. :)