DEV Community

Discussion on: What's your most embarrassing coding story?

Collapse
 
deven96 profile image
Diretnan Domnan

I initially pushed the initially empty sql database of a recruitment test app for the company to git and then pulled on the server. When the database had received thousands of entries, I made a local change and then force pushed to git and then pulled the empty db on the server. I spent hours panicking and frantically searching on how to undo a force push as recruitment department began messaging me that they couldnt find any entry... luckily for me I had stashed before pulling, even though I didn't know what stash meant and I just did it because of the warning (thank you git deities). That day I immediately learnt not to ever push your db, even if empty... also how to connect postgres and set up automatic back ups

Collapse
 
awwsmm profile image
Andrew (he/him)

On GitHub, I think there's an option to forbid force pushing to master. I'm sure it's saved a lot of people 😅