this post was submitted on 20 Nov 2024
870 points (97.6% liked)

Programmer Humor

19774 readers
28 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
870
submitted 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[–] AnUnusualRelic 5 points 3 weeks ago* (last edited 3 weeks ago) (5 children)

Looks like windows should come with a dictionary.

"Huh, discard, I wonder what that does. Let's try it on all my work from the last six months"

Idiots gonna idiot...

[–] [email protected] 16 points 3 weeks ago (2 children)

Problem is, there's an entire generation of users that have gotten super used to "discard changes" as a means of signalling "on second thought, don't do anything".

[–] AeonFelis 2 points 2 weeks ago

From a certain point of view - isn't this exactly what happened here?

I often go into a Git worktree of one of my projects and mess around a bit to try something out. If I find it's not working, I tell git to discard the changes with git checkout . and git clean -df. What I'm saying is exactly “on second thought, don’t do anything" - while what happens in practice is that Git restores all files to their HEAD status and removes all the new files that are not already in HEAD.

Of course, the difference is that I already have all the work I want to keep under source control, so these changes I've discarded really were that - just changes. He, on the other hand, "was just playing with the source control option" - so these "changes" he was discarding really were all his work. But Git did not know that.

load more comments (1 replies)
load more comments (3 replies)