On Tue, Nov 07, 2023 at 12:23:29AM +0000, Hans Meiser wrote: > > > 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.