442
rm -rf / (programming.dev)
submitted 1 month ago* (last edited 1 month ago) by JPDev@programming.dev to c/programmer_humor@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] Prunebutt@slrpnk.net 13 points 1 month ago

I feel dumb: Why git rm -rf and not rm -rf? O.o

[-] JPDev@programming.dev 31 points 1 month ago* (last edited 1 month ago)

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

[-] BatmanAoD@programming.dev 17 points 1 month 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.

[-] Prunebutt@slrpnk.net 4 points 1 month ago
[-] leisesprecher@feddit.org 1 points 1 month ago

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

[-] Prunebutt@slrpnk.net 3 points 1 month ago

That's the joke, yes.

load more comments (1 replies)
this post was submitted on 23 Jul 2024
442 points (96.4% liked)

Programmer Humor

19166 readers
644 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