Git Config Cookbook/Enable autocrlf on Windows

Normalize line endings for Windows users.

Section: Performance and Safety

Enable autocrlf on Windows

bash
bash
git config --global core.autocrlf true

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Performance and Safety
Force LF endings
Prefer LF working tree endings with normalization.
OpenIn sheetbashsame section
Tune auto gc threshold
Adjust object count threshold for auto garbage collection.
OpenIn sheetbashsame section
Enable filesystem cache
Improve performance on some platforms.
OpenIn sheetbashsame section
Trust all directories
Allow all owned repositories; use carefully.
OpenIn sheetbashsame section
Sign commits by default
Require commit signing when supported.
OpenIn sheetbashsame section
Set repo-specific user name
Override global identity in one repository.
OpenIn sheetbash1 tag match