Cloning on Windows fails with `error: unable to create file src/very/deep/.../component.test.ts: Filename too long`.
BeginnerTroubleshootingConfig, Line Endings, Files and Platform Quirks
Answer
Likely causes → Windows' legacy 260-character MAX_PATH limit. Deep node_modules-style paths plus a long clone directory exceed it.
Diagnose → git config --show-origin core.longpaths
Fix →
git config --global core.longpaths true
# also allow long paths in Windows (admin PowerShell):
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name LongPathsEnabled -Value 1 -PropertyType DWORD -Force
Then re-run the checkout: git restore --source=HEAD :/ or clone again. Cloning into a short path (C:\src\app) also helps.
Prevent → Keep repository paths reasonably shallow and include core.longpaths in the Windows dev setup.
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.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:`IntermediateIn your `~/work` repos commits still use your personal email, even though you configured `includeIf` for work.Intermediate