dev@local: ~/project — git
dev@local~/project$git clone
error: unable to create file src/components/very/long/path/name.tsx: Filename too long
error: filename too long
Diagnostics Translation
Git could not check out a file because its path exceeds the OS length limit.
waiting for resolution...
MediumVersion Control System
Reviewed for reference consistency: April 11, 2026
Code is Safe
SECUREGit has paused the operation to protect your code. No data has been lost or corrupted.
What To Know
This message means repository history contains a path Git understands, but the host operating system cannot materialize that path on disk.
Where Did It Fail?
Working Tree
Your local files
add
Staging Index
Prepared changes
commit
Local Repo
Commit history
push/fetch
Remote Server
GitHub/GitLab
Git halted to protect the uncommitted files in your active working directory.
Commands That Trigger This
$git clone
Running on Windows for a project created on a Mac that has deeply nested folder hierarchies
$Attempting to pull branch changes that introduced massive framework paths
Attempting to pull branch changes that introduced massive framework paths
Technical Background
01
When Git hits the OS path limit, it successfully pulls the history but fails to write the specific file, leaving your working directory incomplete.
02
Modern Windows 10/11 supports long paths, but it must be explicitly enabled in the OS Registry, and Git must be told to use it via `git config --system core.longpaths true`.
Underlying Causes
Cloning deep Node.js `node_modules` structures on an older Windows machine
A developer on macOS/Linux created a deeply nested directory that Windows cannot parse
The total path length (including C:\...) exceeds 260 characters
Frequently Asked Questions
Linux and macOS have much higher default path limits. A file path created legally on Mac can easily break a Windows checkout.