I know there is setting in .gitattributes to have
*.txt eol=lf
and there is also this to have all text files default to conversion:
<
Try this
* text=auto !eol
and set core.eol=lf in .git/config.
(the answer is edited, before I proposed one more option "* text=auto eol=lf" but it doesn't work for this case)