Roll Back Subversion Files to a Previous Version

Well, you can’t really “roll back” commits per se, since Subversion remembers everything you’ve committed. But, if you realize that your current version of a file or directory is bad, and you need to restore that to a previous version number, you can do a svn copy like this

svn copy --revision 7  http://svn.yourdomain.com/svn/trunk/somefolder/myfile.php ./myfile.php

The above command will pull down myfile.php from version 7 of your repository and place it into your working copy. You can then check it in with

svn commit ./myfile.php -m 'rolled back to version 7'
You can also roll back directories instead of just specific files.
0