this post was submitted on 20 Nov 2024
447 points (97.5% liked)

Programmer Humor

19616 readers
1248 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 1 year ago
MODERATORS
447
submitted 9 hours ago* (last edited 9 hours ago) by [email protected] to c/[email protected]
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 31 minutes ago

I fucking HATE when abstractions over git use cutesy names that git doesn't use.

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

Honestly no idea why someone would go around a completely unknown menu in a new unknown editor and randomly click things with caution completely out the window. Not having a copy or trying a blank project, not even reading any messages. I mean even if we don't know it's a nuke button, God knows what other edits it could do to your code without you knowing.

This goes beyond rookie mistake. This is something 12 year old me would do. Same with the issue page being 90% swear words.

[–] [email protected] 1 points 1 minute ago

I don't even know why people ITT are blaming the IDE and completely ignoring this.

When you learn git, you do so on a dummy project, that has 5 files which are 10 characters long each.

An IDE is not made so you can't break things, it is tool, and it should let you do things. It's like complaining that Linux will let you delete your desktop environment. Some people actually want to delete your desktop environment. You can't remove that option just because someone can accidentally do it by ignoring all the warnings.

[–] [email protected] 2 points 25 minutes ago

Honestly no idea why editors give shit random names instead of using the terms git uses.

[–] [email protected] 23 points 52 minutes ago

let's turn this into a constructive angle for future devs and current juniors: just learn git cli, I promise you it is much simpler than it seems.

all those memes about git having like a thousand commands are true, but you really will only use like 7 at most per month.

learn push, pull, merge, squash, stash, reset, im probably missing like one or two

I promise you again: it is much simpler than it seems. and you won't have to use these stupid git GUI things, and it will save you a hassle because you will know what commands you are running and what they do

short disclaimer: using git GUI is totally fine but low-key you are missing out on so much

[–] [email protected] 8 points 1 hour ago

Jesus saves, and so should you

[–] [email protected] -4 points 2 hours ago (1 children)

Fuck around things you don't understand, find out. Why even go near the source control area and start clicking stuff if you don't know jack shit about it.

[–] [email protected] 24 points 1 hour ago (1 children)

It seems like he was trying to learn though? He clicked it, like "hell yes I want source control, let's figure this out"

"It says all my files are changed? Oh shit why did it change my files? Shit fuck, undo, how do I undo...Do I want to discard the changes? I don't even know what it changed. Yes please undo whatever changes you did to my files"

And poof.

[–] [email protected] 1 points 41 minutes ago* (last edited 41 minutes ago)

Who learns with five thousand files though?

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

Maybe he would prefer perforce.

[–] [email protected] 1 points 5 minutes ago

Or Jazz RTC. That one was fun.

[–] [email protected] 25 points 2 hours ago

Poor guy basically did a git reset —hard HEAD without even a git repository

[–] [email protected] 12 points 2 hours ago (2 children)

If you ever happen to have 5000 uncommitted files, you shouldn't be asking yourself if you should commit more often. You should be asking yourself how many new repos you should be making.

[–] [email protected] 4 points 1 hour ago

This is without gitignore, so probably just installed one js dependency

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

The person didn’t have any git repository; probably a new programmer that didn’t know how version control works and just clicked discard without understanding what that means in this situation.

[–] [email protected] 3 points 43 minutes ago

This person is why we have that meme where devs would rather struggle for a week than spend a few hours reading the documentation.

[–] [email protected] 57 points 3 hours ago (2 children)

I feel bad for this kid. That really is a bad warning dialog. Nowhere does it say it's going to delete files. Anyone who thinks that's good design needs a break.

Half the replies are basically "This should be obvious if your past five years of life experience is similar to mine, and if it isn't then get fucked." Just adding insult to injury.

[–] [email protected] 19 points 1 hour ago (1 children)

I'm not great at English, but "discard all changes" shouldn't ever mean "Delete".

[–] [email protected] 7 points 1 hour ago

In the context of version control it does. Discarding a change that creates a file means deleting the file.

[–] [email protected] 22 points 2 hours ago (2 children)

Also, why not send them to the recycle bin? I never really thought about it before, but that does seem a reasonable UX improvement for this case

[–] [email protected] 2 points 31 minutes ago

I wonder if there's already a git extension to automatically stash the working tree on every clean/reset/checkout operation...

[–] [email protected] 1 points 53 minutes ago

Because “the underlying Git nukes them right away, so why shouldn’t we perma-delete the files, too?”

Anything else’d be effort…

load more comments
view more: next ›