Ask coding questions

← Back to all posts
2
Student accidentally deleted code - any way to get prior version of program?
kmcleod (1)

Hi! One of my students just emailed me that they were working on their final project and they accidentally deleted 100 lines of code from their program. Is there any way for them to access prior versions of their code so that they can reconstruct what they deleted?

Thanks!
Kate

Answered by eankeen (535) [earned 5 cycles]
View Answer
Commentshotnewtop
4
eankeen (535)

Not sure if you found the solution, but the button can be hidden away. It might also be called "saved".

Once you click on it, then you can access the history mode. On the left sidebar, there's some "change file" text.

Once you click on that, then you can restore a specific file to a specific point in time. I don't think you revert the whole repl though - only a specific file.

1
pattmax (3)

They should be backing up their code on Github in the future.

1
kmcleod (1)

Is this feature available for a classroom assignment as opposed to a regular repl?

1
Masy (17)

@kmcleod

Refer to what our lovely friend @eankeen said and mark his answer as correct.

1
Masy (17)

Or who ever was first

0
enigma_dev (83)

Thats easy to solve, thanks to repl.its history feature. tell your student to click on it, he can there go back in the code-timeline. If this answer helped you, i would appreciate if you amrk it with answered.

2
Vandesm14 (486)

@enigma_dev How come your comment has 0 upvotes? This happens to some other comments that you have. You might want to contact the replit team about this.

1
enigma_dev (83)

@Vandesm14 Thats is myself removing my upvote. It is a psychological thing, might explain that later on discord.

1
enigma_dev (83)

@Vandesm14 Thats is myself removing my upvote. It is a psychological thing, might explain that later on discord.

1
a5rocks (502)

There should be "history" button on their repl, with a bunch of versions which you can back up to.