File name with ? in it causing problems. Unable to delete this file.

I have a checked in file with a ? in the name which is causing me all sorts of problems. Get lots of “error: pathspec”.  I want to delete it but have been unable to do do.  Tried deleting it using the file delete option in the github browser window but screen just goes blank.  Any suggestion on how to delete this file? Thanks

I just tried both adding and deleting a file with a question mark in the file name through the GitHub web UI and it worked both times. I’m not sure what issue you might be running into but here’s what I did to create the file:

  1. Go to the repo in question (in my case https://github.com/lee-dohm/test-repo)
  2. Click the “Create new file” button
  3. Type in “question-mark?test.md” as the file name and add some filler text
  4. Click the “create a new branch” radio button and name it question-mark
  5. Click the “Commit new file” button

Here’s what I did to delete the file:

  1. Go to the repo in question (in my case https://github.com/lee-dohm/test-repo)
  2. Switch to the question-mark branch using the branch drop-down
  3. Click the question-mark?test.md file in the file listing
  4. Click the trash can icon to delete the file
  5. Click the “create a new branch” radio button and name it question-mark-deletion
  6. Click the “Commit changes” button

You can see the question-mark and question-mark-deletion branches on my test repo.

Hopefully that will help you delete the file you’re having problems with. If not, can you describe what you did, what you expected to happen, and what actually happened so that we can get a better idea of what might be going wrong?