git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Why doesn't git core.eol=lf work?

From
JCJason Cho <jason11choca@proton.me>
Date
Jul 13, 2025, 14:08 UTC
Message-ID
<wzZi9r7E7j1avCRjH89z3cdSJnwdoam1xRulfmRkybAYRIGxmZeZCYqRALW-b0B2lKnZ8xnuoAjwpWpMeDAx2oSW4qnlmS8iuUKit3And6Q=@proton.me>
In-Reply-To
<C41F422E-8C9D-4BC7-BA0B-57B7D13D6557@gmail.com>
Show 12 quoted lines
> 
> 
> I believe that it's impossible to check out CRLF from the index as LF.
> You have to use your tool to do that.
> 
> The definition of core.eol=lf is here:
> https://git-scm.com/docs/gitattributes/2.9.5#:~:text=Set,-to string value "lf
> 
> This means that when you use git add to stage files, Git will convert
> CRLF line endings to LF. However, when you check out files, Git will
> leave the line endings unchanged.
> 
I see. Thank you so much. This detail was so subtle and it totally flew under my radar.
Previous: Lidong Yan
Message 7 of 7 in “Why doesn't git core.eol=lf work?”
  1. Jason ChoJul 12, 2025
  2. Torsten BögershausenJul 12, 2025
  3. Jason ChoJul 12, 2025
  4. Johannes SixtJul 12, 2025
  5. Jason ChoJul 12, 2025
  6. Lidong YanJul 13, 2025
  7. Jason ChoJul 13, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.