Hi @yangwulong1978, this is something I’ve come across before and I’m ultimately not sure why this occurs. My best guess from what I’ve read online is it has something to do with git not tracking folders/directories only paths. I apologize in advance for not knowing more information about this but maybe someone who sees this can chime in.
Yes, @gdelarosa guess is correct that this has to do with git not tracking folders and only paths.
So what happens is that if there are any ignored files, (likely .DS_Store), git rm won’t delete the folder. But if you remove the .DS_Store file first and then run the git rm command it will actually remove the folder as well.
The second edition of the book will just recommend running rm -rf js to avoid the confuses this causes.