Sosi
Sosi

Reputation: 2578

SVN recover deleted file

If I delete a file in a trunk of an svn repository, can I get the file if I ask for a previous version, or was the file deleted forever?

Upvotes: 9

Views: 2770

Answers (2)

Rondo
Rondo

Reputation: 3711

There's no way (as of client version 1.6.18) to get the client to restore a previous version by addressing a deleted file directly since the client does not handle path change histories well.

One way to get the file is to export an older revision (to some safe place) You have to export the whole directory at that version. And then, if you want to commit the reversion to that revision, copy the file into place, add it, commit;

Upvotes: 1

Pekka
Pekka

Reputation: 449385

You will get it in the previous revision.

Actually, there is no "standard" way to get rid of a file completely in a Subversion repository. There is quite a lot of heated discussion around whether such a feature should be implemented (see this bug report and this blog post on the issue for example).

Upvotes: 14

Related Questions