Can not remove file with wrong encoding from repo

Issue #9911 resolved
Former user created an issue

I can not remove a file with name акция.png (broken encoding somehow synched with bitbucket) from remote repo.

I'm using Sourcetree and Mac Terminal — there is the same error:

localhost:images phoenixweiss$ git rm "акция.png"
fatal: pathspec 'design/xenon-tver_v1/images/акция.png' did not match any files

Is there any way to remove or fix it on remote? Because even if I fix the name or change it — there is no way to push it to remote repo.

Comments (4)

  1. Abhin Chhabra Account Deactivated

    It seems that git likes to quote every non-latin character based filename. Do the following to resolve your issues:

    $ git config core.quotepath false
    $ git rm акцРёСЏ.png

    The first line configures your local git repository to not quote paths so you can refer to them with ease. If you want, you can set this option globally (for all repos on your machine) by using git config --global core.quotepath false instead of the first command.

    I hope this helps.

  2. Log in to comment