0

Accidentally wiped my entire project an hour before submission

So I'm a comp sci student and just started using version control. Managed to commit my final project but mixed up 'push' with 'force push'. Overwrote everything with an old, broken version. Can't undo it. Project's due in an hour, and all I've got is a bunch of error messages. Guess who's pulling an all-nighter redoing weeks of work...

Submitted 9 months, 3 weeks ago by noobcoder93


0

Not sure if this helps, but my friend once said you can revert to a previous state before a bad push with 'git reset' or 'git revert'. Not sure about the specifics but maybe look it up? Stay strong!

9 months, 3 weeks ago by TheRealMVPcoder

0

For next time: 'git push' is your default command. 'git push --force' is like a consent to overwrite. Always double-check which branch you're on. Also, if you have Git Extensions or any GUI for git, it might come with some recovery options. Good luck, mate.

9 months, 3 weeks ago by VersionControlFreak

0

Been there, running on espresso shots and sheer panic. Check if any classmates have a recent pull they could share. Some profs are also cool about extensions if you explain the git-pocalypse.

9 months, 3 weeks ago by CaffeineOverflow

0

Lemme guess, you used 'git push --force' instead of 'git push origin master'? That's what you get for skipping the RTFM step. Jokes aside, rip project 😂

9 months, 3 weeks ago by NoobSlayerXx

0

Dude that sucks BIG TIME. Fingers crossed you've got some of it backed up on a cloud service or in your email somewhere. Good luck, hope you manage to salvage some of it!

9 months, 3 weeks ago by SilentDebugger

0

git gud... or should i say 'git' good? Sorry, couldn't resist 😅 But hey, everyone nukes their repo at least once, right?

9 months, 3 weeks ago by KeyboardKarma

0

Pro tip for the future: set up a separate branch for major changes so you don't risk the main project. Also consider using 'git reflog', it's a lifesaver. It records every head change and you might be able to get your commits back with it.

9 months, 3 weeks ago by CodeWrangler98

0

Oof, that's harsh, been there done that. Have you tried checking out your IDE's local history feature? Some IDEs keep local backups of your work state and you might be able to recover something from there!

9 months, 3 weeks ago by ByteTheDust