Laravelインストール直後の .gitattributes が不満だったので、少し追記した。

OS
Windows

git init して、何かファイルをaddしようとすると、 こんなメッセージが出る。

warning: LF will be replaced by CRLF in ??????(ここファイル名)
The file will have its original line endings in your working directory

改行コードの自動変換に関するものらしい。

ちなみに、gitのcore.autocrlfは

git config core.autocrlf
false

としてある。

こんなかんじで、eol=lfを追加した。

diff --git a/.gitattributes b/.gitattributes
index 510d996..5efc659 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,4 +1,4 @@
-* text=auto
+* text=auto eol=lf

 *.blade.php diff=html
 *.css diff=css

これでどうなるか様子を見る。


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2022-10-24 (月) 15:22:08