{"thread":{"id":"46248","subject":"EOL LF Windows auto.crlf issue","startedAt":"2017-06-24T16:56:14Z","lastAt":"2017-06-24T22:14:44Z","messageCount":2,"participants":["Filip Kucharczyk","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"323210","messageId":"CADtLFZcQNziGJx-aW9pvUU-NTHcbRN8pHXecMtRgaYwqTjGZWQ@mail.gmail.com","threadId":"46248","inReplyTo":null,"subject":"EOL LF Windows auto.crlf issue","fromName":"Filip Kucharczyk","fromEmail":"fil.kucharczyk@gmail.com","sentAt":"2017-06-24T16:56:08Z","receivedAt":"2017-06-24T16:56:14Z","isPatch":false,"sender":{"key":"fil.kucharczyk@gmail.com","avatar":null},"body":"I'm on Windows 10.\nauto.crlf in .gitconfig is set to\n[core]\nautocrlf = true\nI've got a git (git version 2.13.1.windows.2) repo.\nA linux guy emails me a text with with line endings LF.\nI paste this file into my repo.\nNow every time I introduce changes to this file and stage it, git tell me:\n\"warning: LF will be replaced by CRLF in a.txt.\nThe file will have its original line endings in your working directory.\"\nBut when I commit the file git does not replace anyline endings - they\nstay LF in the commited file and in my working direcotry.\nI'm sort of misleaded by this message.\n\nFilip\n"},{"id":"323225","messageId":"9825c435-d752-79b5-f474-964f1ded8c54@web.de","threadId":"46248","inReplyTo":"CADtLFZcQNziGJx-aW9pvUU-NTHcbRN8pHXecMtRgaYwqTjGZWQ@mail.gmail.com","subject":"Re: EOL LF Windows auto.crlf issue","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-06-24T22:02:43Z","receivedAt":"2017-06-24T22:14:44Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"\n\nOn 24/06/17 18:56, Filip Kucharczyk wrote:\n> I'm on Windows 10.\n> auto.crlf in .gitconfig is set to\n> [core]\n> autocrlf = true\n> I've got a git (git version 2.13.1.windows.2) repo.\n> A linux guy emails me a text with with line endings LF.\n> I paste this file into my repo.\n> Now every time I introduce changes to this file and stage it, git tell me:\n> \"warning: LF will be replaced by CRLF in a.txt.\n\nThis conversion will happen if you do\nrm a.txt\ngit checkout a.txt\n\nAfter these 2 steps, the file willhave CRLF in the working tree,\nsee below.\nBut if you don't, the file stays as it is in the working tree.\n\n> The file will have its original line endings in your working directory.\"\n\n> But when I commit the file git does not replace anyline endings - they\n> stay LF in the commited file and in my working direcotry.\n\nYes, core.autocrlf=true tells Git that they should have CRLF in the working \ntree, at least after a clean checkout.\n> I'm sort of misleaded by this message.\nSuggestions how to improve things are of course welcome -\nfor your case it may help to set\ngit config core.autocrlf input\nfor this very repo.\n\n> \n> Filip\n> \n"}]}