`git diff` says `Binary files a/strings.rc and b/strings.rc differ` for a text file, and merges of it always conflict.
AdvancedTroubleshootingConfig, Line Endings, Files and Platform Quirks
Answer
Likely causes → The file is UTF-16 (common for Windows resource files, PowerShell output, some SQL Server scripts). The NUL bytes make Git treat it as binary, so no line diffs or text merges.
Diagnose →
file strings.rc # "Little-endian UTF-16 Unicode text"
git check-attr -a strings.rc
Fix → Store it as UTF-8 in the repo and convert on checkout:
*.rc text working-tree-encoding=UTF-16LE-BOM eol=crlf
git add --renormalize strings.rc && git commit -m "Store .rc as UTF-8 in repo"
For read-only diffs without changing storage, use a textconv driver: diff=utf16 with git config diff.utf16.textconv 'iconv -f utf-16 -t utf-8'.
Prevent → Prefer UTF-8 everywhere; add working-tree-encoding rules for tools that insist on UTF-16.
More on Config, Line Endings, Files and Platform Quirks
`warning: in the working copy of 'app.sh', LF will be replaced by CRLF the next time Git touches it`Beginner`git diff` shows `old mode 100755` / `new mode 100644` for hundreds of files with no content change.BeginnerCloning on Windows fails with `error: unable to create file src/very/deep/.../component.test.ts: Filename too long`.BeginnerYou renamed `header.tsx` to `Header.tsx` on macOS. Locally everything builds, but Linux CI fails with `Module not found: Can't resolve './components/Header'`.IntermediateCheckout on Windows fails with `error: invalid path 'logs/2024-01-01T10:00:00.log'` (or `'docs/aux.md'`) and `fatal: unable to checkout working tree`.IntermediateClone prints `warning: the following paths have collided (e.g. case-sensitive paths on a case-insensitive filesystem) and only one from the same colliding group is in the working tree:`Intermediate