How does git treat text files as binary?

problem description

as shown in the figure, git treats some files as text files, such as AI/PDF/Word files

what result do you expect? What is the error message actually seen?

The

search has been fruitless for a long time, only with regard to the .gitattributes file, but it only seems to configure some formatting parameters for the text file.

is there any way to treat the specified suffix as a binary file rather than as a text file?

similarly, how do you configure Git to recognize binaries as text?

Mar.15,2022

has been solved, blaming myself for carelessness. Referring to the .gitattributes files of other projects, I found that this file supports this function:

as follows:

*.ai binary
*.psd binary
*.pdf binary
Menu