this post was submitted on 20 Nov 2024
846 points (97.4% liked)

Programmer Humor

19735 readers
310 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
846
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 1 week ago (3 children)

If the files were already staged then git should have blobs in the git folder, so they should be recoverable.

[–] [email protected] 10 points 1 week ago (1 children)

Looks like they weren't staged. He clicked on the staging option, it showed it would stage thousands of files, he said "hey I should fix my .gitignore" and clicked on what looked like either a "don't stage" or a "forget" button, and it was a "checkout --force" button.

The most impressive thing is all the people doubling down on the idea that a "checkout --force" button in a main interaction screen is a great idea, there's nothing wrong with the software, and the user is a moron.

[–] [email protected] 5 points 1 week ago* (last edited 1 week ago)

"discard changes" button - the 5000 "new file created" changes, specifically.

[–] [email protected] 3 points 1 week ago

Did you read the thread? There was a bug that deleted all files even ones unassociated with git.

[–] [email protected] 2 points 1 week ago (1 children)

Sounds like they weren't even using version control, and had no business anywhere near a project that size.

[–] [email protected] 4 points 1 week ago (1 children)

had no business anywhere near a project that size.

Lol. That's a really good point, actually.

I add version control around file number 3200...

(I'm kidding. Writing even a couple lines without version control makes my eye twitch.)

[–] [email protected] 6 points 1 week ago (1 children)

Even back in my super noob days, I'd keep known good working versions of the files in separate folders. I basically invented my own terrible source control system before I knew anything about svn or git.

[–] [email protected] 3 points 1 week ago

Yeah. Same here. We learned to mistrust computers very early.