From: Jason Cho Date: Sat, 12 Jul 2025 10:56:37 GMT Subject: Re: Why doesn't git core.eol=lf work? Message-ID: In-Reply-To: <20250712103030.GA30568@tb-raspi4> > But now to the real stuff: > It may be that your file had been commited with LF or mixed CRLF into the repo. > In this case will Git not change CRLF into LF at checkout. > What does > git ls-files --eol license_header.txt > give you ? $ git ls-files --eol license_header.txt i/crlf w/crlf attr/ license_header.txt > Beside that, I would recommend to set up a .gitatrributes file > and add it to the repo. > echo "* text=auto" >.gitattributes > > git add --renormalize . > git commit -m "Normalize line endings" I am building a tool to analyze codebases, such as which function is moved from one file to another. Different line endings fail string equality. Admittedly I can make a local commit to normalize all files. But it's best if a simple config `core.eol` can work.