13

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

Ether
  • 48,919
  • 12
  • 83
  • 153
coderama
  • 14,202
  • 38
  • 149
  • 282
  • Dup: http://stackoverflow.com/questions/1071857/how-do-i-svn-add-all-unversioned-files-to-svn – Mark L Aug 25 '09 at 09:50

3 Answers3

33
svn add files/*

or:

svn add --force files

(taken from SVN book)

Krzysztof Krasoń
  • 23,505
  • 14
  • 77
  • 102
  • 1
    5 years later, you helped me also! Thanks, the --force was what I needed to add the files changed in subfolders of subfolders... – Pieter V. Dec 11 '14 at 10:58
14

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
Olly
  • 7,492
  • 8
  • 48
  • 59
3

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. :)

Community
  • 1
  • 1
Khemraj Sharma
  • 46,529
  • 18
  • 168
  • 182