I have a working copy that gets automatically committed into SVN overnight using a script.
I use the SVN command line to do so.
After a frustrating battle wi
Try this one on for size - much more elegant than forcing through an svn add:
$ svn add `svn status|grep '\?'|awk '{print $2}'`
You have to call svn add
in your script for each unversioned file prior to svn commit
—something like this for a shell script:
for file in `svn st | grep '^\?' | awk '{ print $2; }'`; do
svn add $file
done
svn --force --depth infinity add .
Be careful, though, because this will also add any svn:ignore
'd files.
The accepted solution
svn --force add .
will also add all ignored unversioned files. Most people likely prefer just to add all unversioned but not ignored files.
To add all unversioned but not ignored files, codefox421 answer is right:
svn st | grep '^\?' | sed 's/^\? *//' | xargs -I% svn add %
as svn st
does not show ignored files.
In my case i need to specify :
svn --force add dir/*/*/*
*
is level of tree that i want to add.
Check the result with
svn status --no-ignore