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:

  • git inspect time at which commit was pushed
  • git: more efficient way to do this
  • Multiple git checkouts from a single repo with hardlinks?
  • How do I split a branch after a certain commit?
  • How to Configure Capistrano to Deploy from Local Git Repository?
  • How to view git log in Emacs?
  • 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?

  • How to rebase (squeeze) last commits to master and change commit message
  • can I make a git alias from this?
  • rake release fail (using gem bundler)
  • can git be used for version control on non text documents such as word doc or xls etc
  • Looking for a secure method of running a php git post-recieve hook
  • Continuous Integration using GIT / BitBucket on a GIT controlled Intranet
  • 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.