Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverting single file in SVN to a particular revision

Tags:

revert

svn

If you just want the old file in your working copy:

svn up -r 147 myfile.py

If you want to rollback, see this "How to return to an older version of our code in subversion?".


svn cat takes a revision arg too!

svn cat -r 175 mydir/myfile > mydir/myfile


svn revert filename 

this should revert a single file.


For a single file, you could do:

svn export -r <REV> svn://host/path/to/file/on/repos file.ext

You could do svn revert <file> but that will only restore the last working copy.