we work a lot in a linux / macos / windows mixed environment, and the only option working really well is: please, git, do not tinker with the line endings, just leave them alone. so core.autocrlf = false. editors are put in "lf" mode, because that is pretty standard nowadays, except for windows "bat" files.