How can I recover from mistaken 'rm *'?

What you can do is re-do the three hours of work, and then think about aliasing your rm command to a script which works like rm but stages deletes through a trash bin directory which must be explicitly emptied before the files are really gone.