简体   繁体   English

git-lfs .gitattributes 文件:奇怪的 unicode 字符

[英]git-lfs .gitattributes file: strange unicode characters

I am using git on windows.我在 Windows 上使用 git。

I added the following line to .gitattributes file:.gitattributes添加到.gitattributes文件中:

"*.msi" filter=lfs diff=lfs merge=lfs -text

Then I checked with git lfs track but nothing shows up.然后我检查了git lfs track但没有显示任何内容。

Then I tried adding with git lfs track "*.msi" .然后我尝试添加git lfs track "*.msi" Now it shows up when using git lfs track but the .gitattributes file looks like this:现在它在使用git lfs track时显示,但 .gitattributes 文件如下所示:

਍∀⨀⸀洀猀椀∀ 昀椀氀琀攀爀㴀氀昀猀 搀椀昀昀㴀氀昀猀 洀攀爀最攀㴀氀昀猀 ⴀ琀攀砀琀ഀ਍⸪獭⁩楦瑬牥氽獦搠晩㵦晬⁳敭杲㵥晬⁳琭硥൴

What's going on?这是怎么回事? I want a readable working .gitattributes file.我想要一个可读的.gitattributes文件。

My .gitattributes file was UTF-16 somehow.我的 .gitattributes 文件不知何故是 UTF-16。 Changed it to UTF-8, now everything is fine.将其更改为 UTF-8,现在一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM