Git Shows Every File Modified Immediately After Clone (core.autocrlf)
Inconsistent LF vs CRLF normalization between Windows and Linux contributors.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: Git Shows Every File Modified Immediately After Clone (core.autocrlf)
Platform: Git
Common Root Causes:
- Inconsistent LF vs CRLF normalization between Windows and Linux contributors.
Interactive Diagnostic Checklist
Verified Solutions:
- Commit a `.gitattributes` file with `* text=auto eol=lf` and `*.sh text eol=lf`.
Safe Diagnostic Command:
git config --show-origin core.autocrlf
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Inconsistent LF vs CRLF normalization between Windows and Linux contributors. Recommended diagnostic: `git config --show-origin core.autocrlf`. Remediation: Commit a `.gitattributes` file with `* text=auto eol=lf` and `*.sh text eol=lf`.
Worked Examples
- Run `git config --show-origin core.autocrlf` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-git-line-endings-crlf-dirty-tree · Independently verified: 2026-11-25