Ask coding questions

← Back to all posts
Lost over an hour of progress, can't restore it
TheOracle (0)

I was editing my Repl, adding comments and new snippets of code. I then added my friend @Michael_Nicol to the Repl so that he could aid me on the project. I then refreshed as for some reason when I clicked 'Run', it always ran the same thing, no matter what I changed.

After that, I lost EVERYTHING: all the comments, functions and snippets of code I added from 11:36 AM to sometime around 12:50 AM, GONE. I sat there shocked for about 5 minutes before doing anything I could to bring back all of that code. I went to the version history and it was not there. I clicked 'Restore' on every file and it still did not come back. Nothing worked.

I am extremely frustrated at this disaster, and I am enraged to the point where I might just abandon the project entirely. This is the single worst thing to happen in my coding career so far. Please, if possible, can someone explain to me how I can restore all of that code? Whoever does so would be my literal savior, and I would appreciate your help deeply.

(NOTE: there has been one edit from @Michael_Nicol from after all the code has been lost, and it is in the CSS file. I have also edited the Javascript file a bit as well, thinking about trying to restore the loss code from my own memory. Unfortunately, I do not actually remember everything that was lost, but I do know that I lost some very important code.)

Comments
hotnewtop
luseufert5 (3)

This is why we use version control (although I feel for you, losing a ton of code due to a glitch is really annoying)

GavHern (93)

This happened to me before... Are you by any chance in the repl.it explorer program? I've had issues with file saving when I join it.

TheOracle (0)

@GavHern, I don't believe I'm using the explorer program, although I'm not entirely sure how to check if I am.

GavHern (93)

@TheOracle You can check by going to https://repl.it/account, then open the "roles" dropdown, then check if explorer box is ticked.

TheOracle (0)

@GavHern, I just checked and none of the boxes were ticked. Also, did you ever managed to restore your lost code?

GavHern (93)

@TheOracle the best bet for restoring lost code would be within the version history (click on where it says saved or saving within the text editor). If it isn't there, that means that the code was never sent from your browser to the repl.it servers and there isn't really anything you can to recover that.

TheOracle (0)

@GavHern, that is very disappointing as one of the first things I did after losing the code was checking the version history, which did not have the deleted code. It sucks that an hour and a half of progress was wasted, but after all:

"Reality is often disappointing." -Thanos, 2017

Thanks for your help, however! I really appreciate it.

[deleted]

Here you go. I have forked your repl and tidied your code: https://repl.it/@malvoliothegood/Idle-EmpireWork-in-Progress

TheOracle (0)

Thank you @malvoliothegood, although it doesn't actually fix my problem, I still appreciate it nonetheless. If you have any idea whatsoever for how to recover all of that lost code I had, I would owe you big time.

[deleted]

@TheOracle I had a similar thing happen. I was not able to get the code back because in the version history there was only one very recent version to choose from.