Git has a very useful shortcut to add all files and commit all of them. Let’s see the same approach for subversion over command line interface
Git equivalent
1git add .
2git commit -am "Message"
git add .
- Add all files in this directory
git commit -am "Message"
- Commmit the fles
When we do this, all files get added. Unfortunately, same thing does not work with subversion.
Subversion svn add .
If we try to repeat the same with svn, bad things happen 😞
1# This won't work
2svn add .
This is the warning we get. 😞
1svn: warning: W150002: '~/work/svnco/prj' is already under version control
2svn: E200009: Could not add all targets because some targets are already versioned
3svn: E200009: Illegal target for the requested operation
Subversion working add and removing all files
The correct way to acheive this is 😄
1svn add --force * --auto-props --parents --depth infinity -q
2svn st | grep ^! | awk '{print " --force "$2}' | xargs svn rm
3svn commit -m "The Message"
Comments