Coworker worked on a special project for a few weeks. Somebody else wanted to hop on, so the project needed to be put on version control, a way of storing a history of changes in a project. He wasn't having any luck getting it uploaded (probably because he was 10x over the size limit for our free repository). I try to help him get it working, and he tells me to "just reset it" and start over. But git reset is a command, so I just do it without thinking (--hard). Everything's gone; the entire project is wiped away. Normally, this wouldn't be a big deal because you'd just go to the last change, but there wasn't a first commit. He didn't even make zipped backups.
Luckily, nobody freaked out and we just discussed possible solutions. Turns out a reset moves files into a temp folder instead of deletion, so everything is still on disk - phew. But the names and file extensions were permanently lost, so now we have 2000 files with random alphanumeric strings as names. Coworker made a script to inspect the file structure and give the file the right extension. Still has to rename everything and manually inspect files which are unrecognized by the heuristic.
I haven't heard of anything like this happening in software for years, but I remember a lot of classmates deleting their homework in highschool and college. I gotta imagine this kind of accident happens a lot in other white collar jobs. Does everyone just use Google Docs now?
Luckily, nobody freaked out and we just discussed possible solutions. Turns out a reset moves files into a temp folder instead of deletion, so everything is still on disk - phew. But the names and file extensions were permanently lost, so now we have 2000 files with random alphanumeric strings as names. Coworker made a script to inspect the file structure and give the file the right extension. Still has to rename everything and manually inspect files which are unrecognized by the heuristic.
I haven't heard of anything like this happening in software for years, but I remember a lot of classmates deleting their homework in highschool and college. I gotta imagine this kind of accident happens a lot in other white collar jobs. Does everyone just use Google Docs now?