git で画像扱う時の設定
git で画像も管理してて、多数の人(多数の環境)の間で編集しあってると、
編集してない画像ファイルが modifiy 済みみたいな挙動をして、git reset --hard しても元に戻らないみたいなことがある。
さくっと!
.gitattributes
# Autodetect text files * text=auto # Force the following filetypes to have unix eols, so Windows does not break them *.* text eol=lf # Denote all files that are truly binary and should not be modified *.png binary *.jpg binary
テキストファイルは 全部 lf 改行
binary ファイルは git にわかるように指定してあげて謎編集を防ぐ
的な?
小一時間費やしてしまった…