-1

I can't remove a file from repository. It is physically deleted, but I cannot commit changes by removing it, because it has a cyrillic name. Also I can't remove it from repository on my Github. Here is the screenshot. It originally named "ЫНСТРУКЦИЯ!.txt" but I couldn't remove it by placing the name into quotes. my local git repository

i2gun
  • 9
  • 2
  • What if you do `git add .` then `git commit`? – Geno Chen Nov 29 '18 at 06:08
  • Because you linked to a screenshot, rather than copying and pasting the text of the `git status` output, it is extremely hard to read and impossible to copy-paste for testing. You might get more and/or better help by including the text as text... – torek Nov 29 '18 at 07:14
  • Downvoted because there is no question in title. Consider changing it to "How to remove cyrillic filenames in git that are shown incorrectly?". – Ashark Apr 07 '22 at 08:36
  • For those who came from search and want to fix that: https://stackoverflow.com/a/22828826/7869636 – Ashark Apr 07 '22 at 08:39

1 Answers1

2

Putting file name in single ticks works for me (bash under MacOS).

13:05 $ rm 'ЫНСТРУКЦИЯ!.txt'
13:05 $ git status
...
deleted:    "\320\253\320\235\320\241\320\242\320\240\320\243\320\232\320\246\320\230\320\257!.txt"

13:06 $ git rm 'ЫНСТРУКЦИЯ!.txt' # <-------- to remove from the repo
rm 'ЫНСТРУКЦИЯ!.txt'
13:06 $ git status
...
deleted:    "\320\253\320\235\320\241\320\242\320\240\320\243\320\232\320\246\320\230\320\257!.txt"
13:06 $ git commit -m"removed"
[master d242a52] removed
 1 file changed, 1 deletion(-)
 delete mode 100644 "\320\253\320\235\320\241\320\242\320\240\320\243\320\232\320\246\320\230\320\257!.txt"
LiMar
  • 2,822
  • 3
  • 22
  • 28