Put inside .gitattributes file:
*.txt text eol=lf
git config --global core.autocrlf false to disable any conversion (which would apply to all versioned files).
You can use git add --renormalize . to apply those .gitattributes settings immediately.
References