You are viewing a single thread.
View all comments
13 points

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

permalink
report
reply
31 points
*

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

permalink
report
parent
reply
17 points

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.

permalink
report
parent
reply
4 points

Thanks

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
3 points

That’s the joke, yes.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 2.9K

    Monthly active users

  • 1K

    Posts

  • 38K

    Comments