This page is talking about the EOL characters management in git.
In the .gitattributes file
path/to/my/file eol=crlf
*.txt -crlf
!*.xyz
* text=auto
* text=auto eol=lf
git config --global core.eol lf
git config core.eol crlf
After default modification, delete the stagin area
git rm --cached -rf .
git config --global core.autocrlf false