Undelete Something With SVN

Hints HOWTOs Web Development

Ever delete something with svn (svn del) and then realize you needed it again? You can get it back by using: svn copy -r HEAD filenameyoudeleted.extension filenameyoudeleted.extension

  • svn copy is the command to get a working copy back
  • -r is short for revision. I used HEAD which will give you the latest in repository. You can specify a revision number, revision right before you committed, etc (check out svn help copy)
  • filename is what you deleted, then where it goes. I usually do something like this within the folder the file was located so you do not see any paths, but if your file was in /www/files/ you would need to specify the file path to /www/files/filnameyoudeleted.extension /www/files/filnameyoudeleted.extension

Working with SVN is a lifesaver – and this tip is gold.

5 thoughts on “Undelete Something With SVN”

Leave a Reply

Your email address will not be published.
*
*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Games

Find Out When New Wii Games Are Released

Ever since I got the Wii, I have been watching to see what old games would be released for the Virtual Console and I finally decided to check out to see if Nintendo had a feed for all new game releases. Sure enough, they have a RSS feed and it lists all new game releases. […]

Business

Jappler Recommends: Vonange

I use Vonage for my home phone, and used to use it as my business phone but decided to go with a ATT with my business line since I thought I wanted to keep a traditional phone line in the house. After my last ATT bill, their hideous ATT business web site (where you are […]