Git delete a file with space in name
I have added a file and also committed
webpageone fresh.rhtml. I left a space in the name. When I a try to remove it, using:
git rm -f /webpageone fresh.rhtml
I get this error:
pathspec '/webpageone' did not match any files.
I tried removing another file and it worked… So the problem is the spacing. How can I remove this?
One Solution collect form web for “Git delete a file with space in name”
That’s a shell problem, not a git problem. You need to escape the space. This should work:
git rm -f /webpageone\ fresh.rhtml
I guess this should also work:
git rm -f "/webpageone fresh.rhtml"