Trust the code editors to manipulate your line endings. Auto crlf should be false. Don't let source control get too smart. If don't need to have your source control tool to change your line endings, don't. This will hurt.
To reiterate from an accepted answer: "Unless you can see specific treatment which must deal with native eol, you are better off leaving autocrlf to false."
Also from the progit book at the end of the section on autocrlf:
"If you’re a Windows programmer doing a Windows-only project, then you can turn off this functionality, recording the carriage returns in the repository by setting the config value to false"
The only other help I can give is that if you take the other route, get familiar with vim -b
which will show special characters such as the CR in MSysGit, and git show HEAD:path/to/your/file.txt
which should show you the file in the way that git stored it.
Set core.whitespace cr-at-eol
to have patches and diffs not highlight CRs as possible problematic whitespace.
Not worth the hassle. Store as-is.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…