git: 'warning: LF will be replaced by CRLF' and whole-file diffs between Windows and Mac teammates
@devsingh05▲ 10 net votes
Different core.autocrlf settings make git rewrite line endings, so files show as entirely changed. Add a .gitattributes with * text=auto eol=lf (and *.bat text eol=crlf if needed), commit it, then renormalise once: git add --renormalize . and commit. Shell scripts with CRLF fail in Linux containers with 'bad interpreter: /bin/bash^M'.