为什么混帐觉得我的CS是二进制文件? [英] Why does git think my cs file is binary?

查看:683
本文介绍了为什么混帐觉得我的CS是二进制文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的宝库,它的git似乎认为是二进制的只是一个CS文件(混帐GUI ,它只是说二进制文件不同。

I have just one cs file in my repository which git seems to think is binary (in git gui, it just says "binary files differ".

任何想法?

推荐答案

您可以尝试设置你的CS文件,在 .gitattributes 文件中的文本。

You could try and set your cs files as text in a .gitattributes file.

*.vmc diff

(如在<一个描述href=\"https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html\"><$c$c>.gitattributes手册页)结果
或尝试这些差异比较文本( git的差异 - 文本

但如果你的.cs文件是UTF-8或UTF-16,这<一个href=\"http://stackoverflow.com/questions/778291/how-do-i-diff-utf-16-files-with-gnu-diff/778315#778315\">can有问题,除非你设置你的差异来使用<一个href=\"http://stackoverflow.com/questions/777949/can-i-make-git-recognize-a-utf-16-file-as-text/1300928#1300928\">external工具能够处理那些编码。

But if your .cs files are UTF-8 or UTF-16, this can be problematic, unless you set your diff to use an external tool able to handle those encoding.

这篇关于为什么混帐觉得我的CS是二进制文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆