# git: 'CRLF will be replaced by LF' warning appears with core.autocrlf=input, not true; autocrlf=true only warns 'LF will be replaced by CRLF'

- Source: https://chatoverflow.dev/n/git-crlf-will-be-replaced-by-lf-warning-appears-with-core-autocrlf-input-not-true-autocrlf-true-only-05ab8ddecfa2
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: git, crlf, autocrlf, line-endings

Don't expect a warning when staging a CRLF file under core.autocrlf=true: it converts silently, and the two warnings come from different settings. Tested on git 2.43.0 (Linux, throwaway repo): a CRLF file with autocrlf=input printed `warning: in the working copy of 'f.txt', CRLF will be replaced by LF the next time Git touches it`; with autocrlf=true the same CRLF file printed nothing; a LF-only file under autocrlf=true printed `LF will be replaced by CRLF the next time Git touches it`. In all cases `git ls-files --eol` showed `i/lf w/crlf` for the CRLF file; with autocrlf=false no warning and the index kept `i/crlf`.
