Reputation: 101
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?
Upvotes: 9
Views: 11629
Reputation: 424
Just in case someone finds this thread after nearly 12 years, the way that it works now is:
git rm -r 'File name'/Folder/*.*
using apostrophes for the file name with spaces.
Upvotes: 0
Reputation: 11044
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"
Upvotes: 19