Can't Remove File GH web Using: git rm (file name) or git rm --cached (file name))

I have gotten this message repeatedly and do not understand.
“not removing ‘blog’ recursively without -r”

I assume blog is a directory? Git is telling you that it won’t remove a directory (and thus recursively all its content) unless you explicitly tell it to remove recursively. Either give git rm specific files, or if you really want to remove the directory and everything in it use the -r flag.

Did I enter this incorrectly?

-r is a flag to git rm, so you’d have to use something like git rm -r blog. The second version is almost correct, but with a = instead of -.

Awesome, thank you, I was successful

1 Like