this post was submitted on 23 Jul 2024
429 points (96.3% liked)

Programmer Humor

19480 readers
1627 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
429
rm -rf / (programming.dev)
submitted 3 months ago* (last edited 3 months ago) by [email protected] to c/[email protected]
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 31 points 3 months ago* (last edited 3 months ago) (3 children)

git rm -rf is only usable within the scope of the git repository and removes files in the staging area and working directory but doesnt affect untracked files or .git. rm -rf affects everything. For this case rm -rf probably would be the better option

edit: did a quick edit on the meme to change it to rm -rf since it makes more sense

[–] [email protected] 17 points 3 months ago

rm - rf is the only version that makes sense, since the only reason to delete and re-clone is to recover from an unexpected .git/ state, and git rm won't remove that.

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

Never heard of it, makes total sense, but I'd guess 95% of developers just nuke the directory raw.

[–] [email protected] 3 points 3 months ago

That's the joke, yes.