Question about CRLF / LF and code editing

Just met this little problem so decide to ask what other developers do about this because at moment VCMI have mixed new line characters. So at moment 228 of 581 ASCII files use CRLF for new line and 4 files mix them.

This a bit annoying because mixing them doesn’t look as good idea and all editing tools I use on Linux of course set LF by default. Is there any trick I can use to make Qt Creator use specific EOL depend on what used in file at moment? Any advices?

Or might be this need to be solved project-wide one time? Thoughts?

In repository all text files should have Unix line endings. Git can do auto-convert to host lineendings on checkout.

As far as I understand by default git doesn’t convert anything so those files use CRLF: … 4db661b265
So might be it’s would be good idea to correct those in repository too?
I suppose everyone who decide to touch codebase on Mac/Linux will met same problem as me.

Yep I found this solution on internet, but I still wasn’t sure how this would work. E.g worry if my changes going to break something after I enable auto correction.

So I suppose it’s would be good enough to use “core.autocrlf=true”?