如何告诉Git settings.html是文本,而不是二进制

Num*_*er8 3 git

Win7,git 1.8.3.1(来自git-scm.org).

我有一个git认为是二进制的settings.html文件.当我在分支之间做差异时,我看到:

[master]> git diff master work2
diff --git a/settings.html b/settings.html
index 2e46976..620dff4 100644
Binary files a/settings.html and b/settings.html differ
Run Code Online (Sandbox Code Playgroud)

我试过保存,提交和推送settings.html

  • Unicode(带签名的UTF-8) - 代码页65001
  • UTF-8,没有签名
  • US-ASCII代码页20127

没有快乐; git认为这个html文件是二进制的.
我怎么能得到git来对待这个 - 以及所有的html文件 - 作为文本?
(我怀疑VS2012正在混淆水域,但项目中的其他html/css/js文件被视为文本.)

感谢您的任何见解......

Pet*_*ren 6

将以下内容添加到.gitattributesrepo根目录中调用的文件中:

*.html text
Run Code Online (Sandbox Code Playgroud)

有关更多信息,请参阅gitattributes(5).