I've compiled this information from two articles online, in case this helps someone else out there.
It's better to store Git files with Unix line endings (LF) and not Windows endings (CRLF).
The convention makes it easier for others to use your code and is what the Git implementation was designed to work with.
Note that, despite what many websites say, git's core.autocrlf setting is a bit outdated and it's better to use a
.gitattributes file.
Using .gitattributes with * text=auto is perfect for new files (Git internally stores text files with LF, but the working copy will have appropriate newlines for the platform).
But when importing from svn, my old svn repos had kept all of the CRLF endings, and doing a git svn import even on a posix system
imported the files with CRLF. Adding the svn:eol-style=native property to all text files in
the svn repo could work, as would importing into git and then doing one large commit to renormalize
line endings, but these would show up in revision history, which I didn't want.
The following worked:
References:
http://maururu.net/2009/svn-to-git-take-2/
Stack Overflow
Next post: Network connections