Git认为保存在unicode文件中的.ini文件是二进制文件 [英] Git thinks .ini saved in unicode files are binary
问题描述
我有几个rainmeter配置文件,我有一些unicode符号,所以我必须将另存为
> unicode
在记事本中,否则它会弄乱我的unicode符号。
但git认为那些是二进制文件和 git-gui
不会向我显示 diff
。
这是怎么回事?或者有没有解决它的方法?
创建 .gitattributes
文件与内容
pattern diff
其中 pattern
是一个匹配配置文件名称的模式。这将使diff将文件视为文本。
Pro Git book 有一个有关Git属性的章节,还有<当然还有一个href =http://www.git-scm.com/docs/gitattributes.html =nofollow>手册页。
I have a few rainmeter configuration files and I have a few unicode symbols, so I have to save as
>unicode
in notepad otherwise it messes up my unicode symbols.
But git thinks that those are binary files and git-gui
doesn't show me the diff
.
Is that how it's going to be? or is there a fix for it?
Create a .gitattributes
file with the contents
pattern diff
where pattern
is a pattern that matches the names of the configuration files. This will make diff treat the files as text.
The Pro Git book has a chapter on Git Attributes, and there's the man page of course.
这篇关于Git认为保存在unicode文件中的.ini文件是二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!