warning: in the working copy of 'x', LF will be replaced by CRLF the next time Git touches it
Git’s line-ending conversion (core.autocrlf) will change line endings in your working copy.
Seen on:
Git
Meaning
Usually harmless on Windows. Mixed settings across a team cause noisy diffs; a .gitattributes file makes behaviour consistent.
Common causes
- core.autocrlf=true on Windows
- Files with mixed line endings
- No .gitattributes normalisation
⚡ Quick fix
- Add .gitattributes with * text=auto (and eol=lf for scripts)
- Renormalise once: git add --renormalize .
Detailed fix by platform
Git
- bash
printf "* text=auto *.sh text eol=lf " > .gitattributes && git add --renormalize .
How to diagnose
- Config — core.autocrlf value?
- Files — Which file types?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026