gitoperating-systemnewline

Git core.autocrlf line ending default setting


I'm trying to figure out what is the default value for core.autocrlf in Git if the user doesn't change this setting.

I've looked in the docs but can't find this info. Can you please point me in the right direction?

Specifically, on a fresh Git install, would Git automatically convert Windows line endings to Unix when committing to a repo from a Windows system?

Thanks!


Solution

  • 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.