SVN Tips That Saved My Ass Once

Ever need to deploy a version controlled site that overwrites existing files? This is common when taking a site from un-versioned to versioned.

First checkout the files using the force option.

svn checkout --force https://vanwinkle.somesvnserver.com/trunk/ ./

This will force the checkout process to complete, but your old files will not really be overwritten. Instead they will be considered modified version of the corresponding file in the repo. So to complete the process you need to do:

svn revert -R ./

This tells subversion to “revert” the files in the existing directory to the versioned state. The -R tells it to do this recursively and the ./ tells it to start in the current directory.