How do I find useful code previously deleted but still stored in source control?

Posted by sharptooth on Stack Overflow See other posts from Stack Overflow or by sharptooth
Published on 2010-04-25T13:06:54Z Indexed on 2010/04/25 13:13 UTC
Read the original article Hit count: 222

Whenever someone asks what to do with code that is no longer needed the answer is usually "delete it, restore it from source control if you need it back".

Now how do I find that piece of source code in the repository? Let's limit scope to SVN for simplicity - I suspect that using any other source control system will not make much difference in this aspect (correct me if I'm wrong).

If I delete that code and commit the changes it will no longer be in the latest revision. How do I find it without exporting each revision and searching thoroughly (which is nearly impossible)?

© Stack Overflow or respective owner

Related posts about version-control

Related posts about source-control