Git delete file named

I added the file and also committed webpageone fresh.rhtml . I left a space in the title. When I try to remove it using:

 git rm -f /webpageone fresh.rhtml 

I get this error:

 pathspec '/webpageone' did not match any files. 

I tried to delete another file and it worked ... So the problem is the distance. How can i remove this?

+6
source share
1 answer

This is a shell problem, not a git problem. You need to avoid space. This should work:

 git rm -f /webpageone\ fresh.rhtml 

I think this should also work:

 git rm -f "/webpageone fresh.rhtml" 
+15
source

Source: https://habr.com/ru/post/921176/


All Articles