ブランチを切り替えるたびにエラーが発生します。
私はこれを数回行いました:
https://help.github.com/articles/dealing-with-line-endings
git rm --cached -r .
# Remove everything from the index.
git reset --hard
# Write both the index and working directory from git's database.
git add .
# Prepare to make a commit by staging all the files that will get normalized.
# This is your chance to inspect which files were never normalized. You should
# get lots of messages like: "warning: CRLF will be replaced by LF in file."
git commit -m "Normalize line endings"
# Commit
そして、問題はまだ発生します。
私の .gitattribute ファイルは次のようになります。
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
エラーが発生します:
「エラー: 次のファイルに対するローカルの変更は、チェックアウトによって上書きされます:」