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.