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:

  • How can I push to a git-svn repo?
  • Git push won't do anything (Everything up-to-date)
  • How can I run “git status” and just get the filenames
  • egit: changes made in one branch are visible on another branch without any commit
  • Pull a commit from a Gerrit repository using its commit ID only
  • how to remove old commits after filter-branch?
  • 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?

  • Is there a Git command to import a hg repository
  • I know svn & git. How to grok Perforce?
  • Can a “git rm -r -f <directory>” command be reverted?
  • SourceTree App says uncommitted changes even for newly-cloned repository - what could be wrong?
  • How to get diff between all files inside 2 folders that are on the web?
  • How do I get TeamCity to automatically merge a Git feature branch with master and fail the build in case of merge conflicts?
  • 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"
    
    Git Baby is a git and github fan, let's start git clone.