Tuesday, May 3, 2011

How to delete a svn repo and recover it

I woke up this morning and before I had my coffee, I did something like following:

svn delete .
svn commit -m "some clean up"

As I said I did this before I had my coffee. ;-) But why would I do such thing? SVN showed M for . because I was playing with some svnignore stuff. The above command completely wiped out the branch I was working on. When I realized what I did, I did not need coffee anymore.

After little googling, I did following

svn cp -m "restore.." https://eejot.org/branches/my-branch@110 https://eejot.org/branches/my-branch

where 110 is x-1 with x being the revision number which nuked the branch I was working on.

No comments: