A
A
Alexander Andreev2018-05-28 13:30:01
git
Alexander Andreev, 2018-05-28 13:30:01

How to remove a file with a Cyrillic character from a commit?

Accidentally, the Cyrillic character "c" got into the name of the import_1c.csv file (the file was called import.csv, it was copied and renamed). Because the file was in an ignored folder, added it to the commit with the command git add -f import_1c.csv after that, the import_1\321\201.csv file began to be displayed in git status (i.e. instead of the Cyrillic letter "c" this code is \321\201 ) and git rm doesn't see it. Attempts to simply demolish the file do not work. What to do? Can I somehow remove it from a commit that has not yet been committed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2018-05-28
@melkij

git rm is about the file of a commit already recorded in the history.
You can reset an erroneously added file to tracking after git add with git reset HEAD filename
(and I remember there are hints about this even in the git status itself)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question