• Hey Guest. Check out your NeoGAF Wrapped 2025 results here!

I deleted everything

Status
Not open for further replies.

Makai

Member
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?
 
Just a casual fuck up.

I've had coworkers just up and delete 2000+ products from a estore for a few hours.

These things happen. If they happen often it's a problem. Usually it's not.
 
death_note_mikami_gif_by_tsukuyomi47.jpg
 
Last year there was a news story of a man who rm -rf deleted his entire company's files. Also his client's files. Essentially he deleted his entire company.

EDIT: Or it was fake.
 
I once deleted three months of work on a web app accidentally through our Debian sever.

It was a huge school project. My teammates never knew because I was doing all the work anyway.

It's soul crushing.
 
Last year there was a news story of a man who rm -rf deleted his entire company's files. Also his client's files. Essentially he deleted his entire company.
I never understood how that one happened. Cloud stuff is supposed to have redundancies to prevent that. Maybe he had all of that disabled to save money.
 
I messed up some terminal commands a few years back and ended up erasing my macbook's SSD and the connected 128GB USB stick. A fun day that was.
 
I was setting up a web site and web service for a very important client at work, and then managed to accidentally delete all their other web sites in one fell swoop. Once the client called me to tell me, I felt the world collapsing around me.

Luckily the guy mostly just laughed it off and used a backup to restore everything, but he had me sweating for a moment.
 
I once deleted a paper I worked on for 3 days. Felt like a dingbat. Luckily the professor gave me an extension.
 
Once I deleted the inventory data from a deployed database.

Once I changed the status of all client orders in the same db.

I stopped playing on deployed dbs ever since.
 
I'm super paranoid about this kind of thing. I have automated backups created on another disc and also in the cloud of everything important, and it runs each morning at 4 am.
 
Our company a few years ago had a minor snafu where a new IT guy wiped out our inventory records. 5 million pounds of product across three warehouses just vanished. And of course our backup system didn't work. Took us a full week to get everything straightened out, and pretty sure a thousand cases of product got stolen in the process since we couldn't say one way or the other what we had on hand.
 
Does everyone just use Google Docs now?
What? Fuck no.

Real businesses have these things called file servers that have shadow copies and weekly full backups and daily incremental backups.

Even when a user pulls a dumbass move I have been able to restore within minutes.
 
I had a problem in a previous job where I deleted a table on a postgres server that we were using for data mining. Thankfully we could just regenerate it since it wasn't code, but it still took like 3 days to get it back.
 
And it only goes to shows once again - git is fucking garbage.

Yeah, yeah, it got some nice capabilities, but there is no reason a fucking version control system should be so fucking complicated.
You can say "git gud" or RTFM, and I did, both, I'm think quite proficient with git these days, but when you have huge part of your usebase having pretty poor understanding on something that should just get the job done and be out of your fucking way as a dev, it's a failure of design.
 
And it only goes to shows once again - git is fucking garbage.

Yeah, yeah, it got some nice capabilities, but there is no reason a fucking version control system should be so fucking complicated.
You can say "git gud" or RTFM, and I did, both, I'm think quite proficient with git these days, but when you have huge part of your usebase having pretty poor understanding on something that should just get the job done and be out of your fucking way as a dev, it's a failure of design.

How is it Git's fault that this dude hadn't been committing code along the way while working on a project? No version control system would've saved him. He didn't even need to have a remote repo in this case to avoid this problem.

If you think Git is garbage, you're very lucky you never had to use SVN or CVS.

Git really isn't complicated. You rarely ever need any of the advanced commands, and sticking to branching, merging, committing, pushing and pulling is pretty simple.

To the OP: I'm pretty sure you can undo a reset --hard command by using the reflog, but if you've been messing around more with the .git folder it might be too late.
 
And it only goes to shows once again - git is fucking garbage.

Yeah, yeah, it got some nice capabilities, but there is no reason a fucking version control system should be so fucking complicated.
You can say "git gud" or RTFM, and I did, both, I'm think quite proficient with git these days, but when you have huge part of your usebase having pretty poor understanding on something that should just get the job done and be out of your fucking way as a dev, it's a failure of design.

Yeah was going to say this as soon as I fucking saw that it was a Git problem. I had to use that shit in school and it was an enormous headache. Now I just have Sourcetree installed, my developer tells me when there's a new revision, and I pull. That's the extent of how I'll use Git
 
And it only goes to shows once again - git is fucking garbage.

Yeah, yeah, it got some nice capabilities, but there is no reason a fucking version control system should be so fucking complicated.
You can say "git gud" or RTFM, and I did, both, I'm think quite proficient with git these days, but when you have huge part of your usebase having pretty poor understanding on something that should just get the job done and be out of your fucking way as a dev, it's a failure of design.

Personally I use a software with a clean and nice user interface for git commands. I mean I could use git from command line but it's so much easier and safer using a graphical interface. At work I have about 10 different repositories cloned at any given time, using software to straighten up the complications and speed up routine stuff is no sin.

Git is a bit complicated yes but it is quite flexible so I can live with the added complexity.
 
Personally I use a software with a clean and nice user interface for git commands. I mean I could use git from command line but it's so much easier and safer using a graphical interface. At work I have about 10 different repositories cloned at any given time, using software to straighten up the complications and speed up routine stuff is no sin.

Git is a bit complicated yes but it is quite flexible so I can live with the added complexity.

The problem with GUIs like Sourcetree is that you don't really know what they're actually doing under the hood, or what commands are being run, so if anything goes wrong you're kind of screwed. It's kind of like writing HTML vs. using a WYSIWYG app to design a website.

They're good for non-devs who have to touch code (PMs, designers, etc) but I wouldn't really recommend it to a full-time software engineer.
 
Just so you guys know, when you delete something beyond the recycle bin, it's not gone right away. It's still on your hard drive, it's just hidden away from the file browser with a flag that the data can be written over. As long as you didn't go download a huge 50gb game or something, you can find freeware on the internet to unflag it and restore it.

Just a tip if you delete a paper or something for college simple like that.
 
And it only goes to shows once again - git is fucking garbage.

Yeah, yeah, it got some nice capabilities, but there is no reason a fucking version control system should be so fucking complicated.
You can say "git gud" or RTFM, and I did, both, I'm think quite proficient with git these days, but when you have huge part of your usebase having pretty poor understanding on something that should just get the job done and be out of your fucking way as a dev, it's a failure of design.
What do you use instead?

Yeah was going to say this as soon as I fucking saw that it was a Git problem. I had to use that shit in school and it was an enormous headache. Now I just have Sourcetree installed, my developer tells me when there's a new revision, and I pull. That's the extent of how I'll use Git
I use Visual Studio's git GUI, but my team mandates that feature branches are rebased onto the dev branch before merge. It asks me to pull and push at the same time every time I do this, so I have to open the terminal and force push (another good way to delete everything).
 
How is it Git's fault that this dude hadn't been committing code along the way while working on a project? No version control system would've saved him. He didn't even need to have a remote repo in this case to avoid this problem.

If you think Git is garbage, you're very lucky you never had to use SVN or CVS.

Git really isn't complicated. You rarely ever need any of the advanced commands, and sticking to branching, merging, committing, pushing and pulling is pretty simple.

To the OP: I'm pretty sure you can undo a reset --hard command by using the reflog, but if you've been messing around more with the .git folder it might be too late.
This is obviously human error, I'm not denying it. But in my experience, human errors happen in unusual high regularity with git. You can also search online to see with how many basic tasks developer are struggling when using git.

And yeah, this shit is not beyond human comprehension, and as I said, I think I'm pretty damn proficient in gif, but when you have a large chunk of your userbase struggling to use your tool, it's a failure of your tool

p.s.
Personally, the less amount of time I need to spend in learning shit like source control the better. And there are waaaaaaaaaaaaaaaaaay easier source control tools out there, and personally, I never thought what git add in capabilities is worth it (and it's not like it's not missing some things too).

p.p.s.
https://xkcd.com/1597/
 
I managed to delete everything out of a very important SQL database, thank fuck I had a off site backup for it that was taken the night before.
 
This is obviously human error, I'm not denying it. But in my experience, human errors happen in unusual high regularity with git. You can also search online to see with how many basic tasks developer are struggling when using git.

And yeah, this shit is not beyond human comprehension, and as I said, I think I'm pretty damn proficient in gif, but when you have a large chunk of your userbase struggling to use your tool, it's a failure of your tool

p.s.
Personally, the less amount of time I need to spend in learning shit like source control the better. And there are waaaaaaaaaaaaaaaaaay easier source control tools out there, and personally, I never thought what git add in capabilities is worth it (and it's not like it's not missing some things too).

p.p.s.
https://xkcd.com/1597/

What are these easier source control tools? Mercurial is really the only other modern-ish one I can think of, and IMO way more difficult to grok than git.

Look online and you'll find the same struggling and complaints for CVS, SVN, Perforce and Mercurial. Git is just far more popular and much newer than them, so you'll find more hits on StackOverflow.

I think the issue is that a "large chunk of the userbase" either aren't full-time developers, or aren't putting the proper time into learning it. All professional tools require investment to learn and use. I'm sure the vast majority of Final Cut Pro or Photoshop users suck at those too because numbers-wise they likely are casual users looking for a quick way to edit a photo or video.

PS: I'm also appalled at how little time (often none) is spent on version control and other professional tools/workflows/concepts (unit testing, refactoring, debugging, etc) for CS grads in college, but that's a topic for another day.
 
If you made any local commits they are probably available in the reflog, you can use git reflog to get the SHAs. Super useful and can even be used to see remote commits if you've overwritten them with a force push (though please don't force push).

This is why you should always start with your shit version controlled. This would be the same story if your hard drive failed, you wouldn't have any back ups.

Git is actually a pretty simple tool that seems more intimidating than it really is. Almost every command you can --dry-run and it will tell you what the command would have done. This is basically like rm -rf / and then blaming it on rm.
 
I've done it a couple of times, especially using the source filename after -o or a move that write over the source instead of the compiled code/pdf. Versionning and backups usually save me, but trying to remember the e.g. last 30 minutes of changes can be hard.

(besides that, I'm paranoĂŻd, I have backups everywhere)

If you think Git is garbage, you're very lucky you never had to use SVN or CVS.
SVN lacks a lot of things that Git provide, but if I'm alone on a single computer, I still would prefer working with SVN than with Git*. I've even used SVN-Git in the past. I dislike the philosophy behind Git, while I understand how you can like it.

(*That been said, I use Mercurial)

Not to say Git is responsible here...
 
So wait, were you trying to setup a git repo for binary files (.doc, PSD, etc)? Doesn't sound like something I'd use a source control management tool for. Dropbox or Drive or something more file system-y is gonna be better if you are just trying to remotely collaborate.
 
Yeah was going to say this as soon as I fucking saw that it was a Git problem. I had to use that shit in school and it was an enormous headache. Now I just have Sourcetree installed, my developer tells me when there's a new revision, and I pull. That's the extent of how I'll use Git

Same. Had someone chew me out for not knowing git commands. I was like I've been working at this company for all these years and nobody's noticed or cared, and that I didn't want to waste 2 weeks doing an extensive rampup on that shit cli only to be less productive at the end.
 
So wait, were you trying to setup a git repo for binary files (.doc, PSD, etc)? Doesn't sound like something I'd use a source control management tool for. Dropbox or Drive or something more file system-y is gonna be better if you are just trying to remotely collaborate.
It's a software project that had a few large binary files. I mean, it was too late to think about making submodules or whatever because I had already wiped it.
 
And it only goes to shows once again - git is fucking garbage.

Yeah, yeah, it got some nice capabilities, but there is no reason a fucking version control system should be so fucking complicated.
You can say "git gud" or RTFM, and I did, both, I'm think quite proficient with git these days, but when you have huge part of your usebase having pretty poor understanding on something that should just get the job done and be out of your fucking way as a dev, it's a failure of design.
Preach. The design is OK but the interface is garbage garbage garbage.
 
SVN lacks a lot of things that Git provide, but if I'm alone on a single computer, I still would prefer working with SVN than with Git*. I've even used SVN-Git in the past. I dislike the philosophy behind Git, while I understand how you can like it.

(*That been said, I use Mercurial)

Not to say Git is responsible here...

I should probably have added the disclaimer to my posts that I'm emphasizing the use case of version control with teams. I think the better collaboration support that comes from its zero-friction branching is where it really shines in comparison to older systems.

If you already are familiar with SVN, then I don't imagine you'd get much benefit from Git if you're working solo without a remote (maybe even with one)
 
What are these easier source control tools? Mercurial is really the only other modern-ish one I can think of, and IMO way more difficult to grok than git.
I think it's a matter of what you've used before. Coming from SVN, Mecurial seems far more sound to me. And far less a hack.

Git is just far more popular and much newer than them, so you'll find more hits on StackOverflow.
Far more popular, no doubt. I'm wondering what people on Windows use, because Git usually isn't great on Windows.

Not newer than Mercurial, though (they're both from 2005, and they have virtually the same capabilities, barring a couple philosophical differences).

The alternatives are probably more Bazaar or Monotone than SVN which is not a DCVS. But anything beside Git and Mercurial is rather obscure.
 
I think it's a matter of what you've used before. Coming from SVN, Mecurial seems far more sound to me. And far less a hack.

Yep I'd agree with that. I had more trouble switching from SVN to Git than some of my coworkers had picking up Git as their first source control system. They're pretty fundamentally different in philosophy and the way they handle certain tasks.

It's actually been so long that I actually don't remember a single thing about SVN. There were a couple key short blog posts I read that made Git really click at a fundamental level, and I haven't looked back since.

My mistake about the Git/Mercurial age thing.
 
I don't get the git hate. Never had any issues with it, and I don't consider it hard --and I've bisected, rebased, squashed, merged with different strategies, cherry-picked and pushed --force a fair bit. It has safeguards literally damn everywhere.

I get the point that people would rather not read 10000000 man pages and command outputs and prefer guis to that to get the job done asap, but I don't think it's really bad. Just read everything the command spits at you and read many guides and you're golden.

Tldr; #usegit, no gui, and you'll grok it.
 
Status
Not open for further replies.
Top Bottom