Git Config Cookbook/Force LF endings

Prefer LF working tree endings with normalization.

Section: Performance and Safety

Force LF endings

bash
bash
git config --global core.eol lf

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
Enable autocrlf on Windows
Normalize line endings for Windows users.
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