Why git decides that my file is binary

I added a text file to the repository, and git decided that it was a binary file. Here is my file ( link ), and github shows it as a regular text file.

But if I try to see the changes that were made by the last commit , I see a message

Binary file not shown 
+6
source share
2 answers

From cloning your repo, I see that this file is UTF-16. I do not believe git supports this as a text format. See this link for more information.

+7
source

It is encoded in UTF-16. Try changing the encoding to ASCII or UTF-8 and commit and click.

+2
source

Source: https://habr.com/ru/post/904296/


All Articles