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

Programmer Humor

19804 readers
59 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
873
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
[–] calcopiritus 19 points 3 weeks ago (10 children)

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.

[–] thebestaquaman 16 points 3 weeks ago (5 children)

Got will not delete untracked files though, which is what happened here. If you want to discard changes to a file with git, you first have to commit the file to the index at some point, which means there's only ever so much damage an erroneous "git restore" or "git reset" can do. Specifically, neither of them will delete all the files in an existing project where VC has just been added.

[–] Valmond 1 points 3 weeks ago (1 children)
[–] thebestaquaman 2 points 3 weeks ago

Yeah, I guess I've got to leave it like that now..

load more comments (3 replies)
load more comments (7 replies)