Undeleting a file in Subversion

It would appear that Subversion does not support a direct “undelete” command so here is one way to recover/undelete a file that was previously removed from a Subversion repository. The 955 is the version of the repository where the file last existed.

$ svn cp -r 955 http://svn.domain.com/reponame/pathtofile/foo.bar foo.bar
A foo.bar
$ svn commit -m "Undeleted this file" foo.bar

Best of luck!

3 thoughts on “Undeleting a file in Subversion”

  1. Thanks for the post, and thanks for Jared’s comment. Jared’s way worked for me to undelete a directory.

Leave a Reply