Add text=auto to .gitattributes.
See http://git-scm.com/docs/gitattributes End-of-line conversion Note