I want to force Git to check out files under Windows using just LF
not CR+LF
.
I checked the two configuration options, but was not able to find the right combination of settings.
I want to convert all files to have LF
line breaks and keep the LF
in the files.
Remark: I used autocrlf = input
but this just repairs the files when you commit them.
I want to force it to get them using LF
.
Probably I wasn't so clear:
the repository is already using LF
but the files checked out using
Git for Windows are using CR+LF
and I want to force Git to get them with LF
:
forcing Unix line endings.
$ git config --list | grep crlf
core.autocrlf=input
autocrlf=input
is the correct option. Of course it doesn't protect you from files that genuinely havecr+lf
in the repository or creating files withcr+lf
in another tool before adding them to git. What problems are you having that this doesn't work for? – AnsleyLF
but when I get them under Windows msysgit converts them toCR+LF
. – Poppleautocrlf
set toinput
, git is leavinglf
linefeeds alone. Can you post the output ofgit config
? – Ansleygit config --list | grep crlf
– Ruthiprovisioner "file"
and executed by aprovisioner "remote-exec"
block in aterraform apply
run from Windows 10, that should be executing on a Linux-based machine image. It was my case at least. 4 hours spent on this. – Anstice