See: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration which suggests adding git config --global core.autocrlf true as does https://bornsql.ca/blog/the-hell-of-git-line-endings-and-the-not-so-simple-fix/