In order to avoid issues withg line endings, Git suggests repo should only contain LF (Linux/Mac) line endings, only with a few exceptions for Windows only files.
https://git-scm.com/docs/gitattributes/en#_end_of_line_conversion
It suggests doing:
$ echo "* text=auto" >.gitattributes
$ git add --renormalize .
$ git status # Show files that will be normalized
$ git commit -m "Introduce end-of-line normalization"
And then check each and every file if they should be converted or not, and if they are binary and should be ignored.
https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_formatting_and_whitespace
This implies Windows users needs the following config:
$ git config --global core.autocrlf true
While Mac/Linux needs config to be:
$ git config --global core.autocrlf input