2017-07-20 14 views
0

私のgitリポジトリには、自分自身を変更しないと考えることを拒否する2つのバイナリファイルがあります。これには、私が最初にチェックautocrlfされているWindows ENVです:今、私はすべての変更を取り除くためにリセットgit diffの相違点を示すgit diff

> git config core.autocrlf 
false 

> git reset --hard 
HEAD is now at 6d67f13 

今私は、違いを確認してください。

> git diff 
warning: CRLF will be replaced by LF in resources/public/fontawesome/fonts/fontawesome-webfont.eot. 
The file will have its original line endings in your working directory. 
diff --git a/resources/public/fontawesome/fonts/fontawesome-webfont.eot b/resources/public/fontawesome/fonts/fontawesome-webfont.eot 
index 33b2bb8..ec6fb3a 100644 
Binary files a/resources/public/fontawesome/fonts/fontawesome-webfont.eot and b/resources/public/fontawesome/fonts/fontawesome-webfont.eot differ 
diff --git a/resources/public/fontawesome/fonts/fontawesome-webfont.woff2 b/resources/public/fontawesome/fonts/fontawesome-webfont.woff2 
index 3311d58..680a9dd 100644 
Binary files a/resources/public/fontawesome/fonts/fontawesome-webfont.woff2 and b/resources/public/fontawesome/fonts/fontawesome-webfont.woff2 differ 
warning: CRLF will be replaced by LF in resources/public/fontawesome/fonts/fontawesome-webfont.woff2. 
The file will have its original line endings in your working directory. 

autocrlfをfalseに設定すると、上記の警告が発生してはならないと私は理解しています。また、これらはバイナリファイルなので、このような置き換えは関係なく実行されるべきではありません。私は何が欠けていますか?

+0

'core.autocrlf'を' false'に設定すると、Gitはすべてのファイルがテキストであるとみなされません。それはまだテキストであると言われるファイルにcrlfの翻訳を適用します。これらの2つのバイナリファイルのテキスト解釈を強制する '.gitattributes'ファイルがある可能性があります(diff目的ではまだバイナリとして扱われています)。 – torek

+0

ええ、.gitattributesには次の行があります: "* text eol = lf"問題を再現するのは難しいことですが、その行を試してみると、今問題が解決されています。 – mlohbihler

答えて

0

ヒントのための@torekのおかげです。問題を解決しているようだ「テキスト」ビットを取り出す

* text eol=lf 

:問題は、このラインを持っていたプロジェクトで.gitattributesファイルされているように見えます。

関連する問題