Git core.autocrlf line ending default setting

It is difficult to find this stated but I could figure out by trial and error that:

  • the default value is "false"

  • Windows installer let you choose the desired behavior but by default (if you install without changing proposed settings) it sets it to "true". This is not the software default, the installer sets the core.autocrlf system setting.

"false" means no processing on line endings "true" means checking in as LF and checking out according to system (CRLF on Windows and LF on Unix).

When Unix and Windows are both used it is advisable to use "false" on Unix (because automatic conversion can break some binary files that looks like text files and Unix uses LF anyway) and "true" on Windows (otherwise the repository is filled with CRLF which is causing compatibility issues).


Checking the git source code, core.autocrlf is set to false by default. (And has been since the property's original introduction on Feb 13, 2007, though it has since been converted from a static value to a constant.)

The Windows installer does require you to pick a value for this property which is explicitly set in the git system config.


You can list all config key-values by issuing this command

git config --list

And as I see the default is

core.autocrlf=true

Although this is the setting I chose(or better to say "not touched") when I was installing Git for Windows