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

Programmer Humor

19623 readers
1734 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
593
submitted 14 hours ago* (last edited 13 hours ago) by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 8 points 2 hours ago (1 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.

[โ€“] [email protected] 2 points 2 hours ago