This should convert all files checked into the repository to
LF line endings, with exception of pictures and PDFs. Trying
to commit CRLF text on Unix will issue a warning when doing
"git add" or "git commit -a".
Users prefering CRLF (Windows) can set their local copy of the
repository to convert files on the fly at checkout with
git config --local core.autocrlf = true
Note: Git acts pretty stubborn on files which don't match the
.gitattributes rules, but are already committed. This can
happen after every change to .gitattributes. Git doesn't want
to keep these files as-is in the repository and insists on
conversion as soon as they're touched somehow. The only way to
deal with this is to either edit .gitattributes again (in case
these enforced conversions don't match the intention) or to
commit the enforced changes immediately.
To put a bit more oil into the fire, Git doesn't recognize all
misalignments immediately, but trusts its cache. Accordingly
it's a good idea to clear this cache after any change to
.gitattributes:
rm .git/index
Having this done, all further proceedings will show all
misaligments immerdiately.
For further instructions and descriptions see
http://schacon.github.io/git/gitattributes.htmlhttp://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/http://git.661346.n2.nabble.com/possible-gitattributes-eol-bug-with-new-eol-crlf-lf-support-td5516458.htmlhttps://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings