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

Re: Explanation of `eol` attribute doesn't seem correct for Windows machines

From
Torsten Bögershausen <tboegi@web.de>
Date
Nov 7, 2023, 17:12 UTC
Message-ID
<20231107171215.GA28569@tb-raspi4>
In-Reply-To
<AS4P195MB1527BC2DF67412D4FF340989E2A9A@AS4P195MB1527.EURP195.PROD.OUTLOOK.COM>
On Tue, Nov 07, 2023 at 12:23:29AM +0000, Hans Meiser wrote:
Show 5 quoted lines
> > > And what happens when a file is added to the index with `core.autocrlf=input` on Windows machines?
> > Do you have a .gitattributes file ? Or not ?
> > Is the file a new one, or does it exist ?
>
> Exactly all these questions/cases should be explained by the documentation, I suppose.

In general, the CRLF - LF ("line endings") conversion is defined by different settings.

The .gitattributes file (which is typically added to the repo and commited, so that it travels trough into all repos by using `git clone`, `git pull` or `git fetch` followed by a `git checkout`

This link https://git-scm.com/docs/gitattributes#_text should describe everything you may want to know about .gitattributes to handle line endings. If I say "should" then this is from a perspective of someone who has read and used this too often to see with fresh eyes what may be missing.

Previous: Hans Meiser
Message 4 of 4 in “Explanation of `eol` attribute doesn't seem correct for Windows machines”
  1. Hans MeiserNov 6, 2023
  2. Torsten BögershausenNov 6, 2023
  3. Hans MeiserNov 7, 2023
  4. Torsten BögershausenNov 7, 2023

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.