1

I have a file in a project. The project is something that was passed to me and has a lot of CRLF/LF mismatching. I've added a rule in my .gitattributes to set the file to LF on commits eol=lf all good and well, the file is using LF in my repo.

Here's the problem: each time I checkout the file it's checked out as CRLF, which results in git interpreting it as "changed" because the repo has LF. It's very very annoying to fix and I've failed to fix it with anything other then commiting the change in the branch which obviously is commiting the change as CRLF (local) -> LF (repo), ie. technically doing nothing.

Anyone know what setting causes this LF (repo) -> (checkout) -> CRLF (local) -> Looping Conflict from CRLF =/= LF?

With regard to * eol=auto, I don't use that, since git's behavior, even on linux, is to check everything out as CRLF. I've yet to see a case where eol=auto actually checks a file out as LF.

0

You must log in to answer this question.

Browse other questions tagged .