core.autocrlf=true on a machine that is not Windows, or on a repository of LF files
CommonThe setting is meant for Windows working copies. On macOS or Linux, or in a project that wants LF everywhere, it rewrites files you did not intend to change.
Confirm
git config --show-origin --get core.autocrlf
true, and the file it is set in (your global config, or the system one an installer wrote)
Fix
- On macOS and Linux, use input (convert CRLF to LF on commit only) or false: git config --global core.autocrlf input.
- On Windows, true is the usual choice, and the warning is expected and harmless for most files.