I was working on a project and fixing some problems with a .bib file that I copied from another project, when suddenly I only got empty error messages by Overleaf and now the main.tex file is completely empty. I did not have any saved versions of the project yet. I cloned the project via git and the main-file there is empty as well. There is still a downloadable version of the pdf, but the project contained some very complicated tikz-graphs and other things that would kill me if I had to redo them. Is there any hope that I can recover my project?
(Disclaimer: I'm a support personnel at Overleaf.com.)
If you have not saved a labelled snapshot in the "History & Versions" menu that you can restore from, there are two other possibilities.
The 24-hour File History (the clock icon just next to "Edit") can restore a file's history in the last day. Clicking on that icon will display the 24-hour history of the file currently loaded in the source code panel. (This is available across all subscription plans, including the Free plan.)
If the edits needed are beyond 24 hours ago, or an entire file was deleted, the Full History feature will be useful; see https://www.overleaf.com/help/286 for further details.
In brief: Browse through your project's Timeline or Recent Activities from the "History & Revisions" tab. If you then see an edit that you need, you can click on the view source link (before or after the change) and then on copy to copy the entire file contents at that point; or use the download .zip to download the entire project before/after that point.
The Full History is a Pro plan feature; it can be accessed by activating a free Pro trial at https://www.overleaf.com/plans if you don't want to subscribe immediately.