How to delete “-” file from svn?

Accidentally I have created file “-” (just a minus) in a directory and commited it.
I have to delete it because its causing error on other machines:
svn: Can’t convert string from ‘UTF-8’ to native encoding:
svn: ?\226?\128?\147

I can remove it from local directory using “rm -i *” or with python “os.remove(‘\xe2\x80\x93’)” but those methods do not work with “svn rm”.

  • Fish Shell - Init Git repo yields constant terminal output after every command
  • Why am I getting “: No such file or directory” when trying to execute a bash script?
  • Bash - get last dirname/filename in a file path argument
  • Why does git-pull fail with signal 13?
  • How to run ./script.sh in windows Git shell?
  • Git hook script fails but script runs fine in terminal
  • How to delete such file from svn repository?

  • Is there a command to list SVN conflicts?
  • Git format-patch to be svn compatible?
  • How to create a branch from a previous svn-revision using SmartGit?
  • Using the tofu scale with svn
  • How to apply SVN diff to Git?
  • svn:ignore 'file' is not under version control
  • 4 Solutions collect form web for “How to delete “-” file from svn?”

    You could try svn rm ./-

    It might not actually be a minus, tho’, but a similar-looking character.

    Usually, you need to terminate the list of command line options using a -- marker.

    Try something like svn rm -- -.

    Same if you want to remove the directory from the file system: rm -r -- -.

    try svn rm -- -

    -- means “stop reading options”.

    In some cases (at the console, for example) you might not be able to copy/paste an odd character. In that situation, you can use file globbing. It’s a good idea to do ls before the rm to make sure you’re not including something in the deletion that you want to keep.

    Any single-character filename:

    ls -l ?
    rm ?
    

    or, any single-character filename that’s not an alphanumeric character or a hyphen:

    ls -l [^a-zA-Z0-9-]
    rm [^a-zA-Z0-9-]
    

    Another version (locale-aware) of that would be:

    ls -l [^[:alnum:]-]
    rm [^[:alnum:]-]
    

    You can combine other lists of characters and classes in addition to more globbing and specific characters.

    Delete any file with a three-character name that doesn’t start with “m”, “s” or “y”, has any second character, and ends with “1” or “9”:

    rm [^msy]?[19]
    
    Git Baby is a git and github fan, let's start git clone.