<t>Git has a limit of 4096 characters for a filename, except on Windows when Git is compiled with msys. It uses an older version of the Windows API and there's a limit of 260 characters for a filename.<br/>
<br/>
So as far as I understand this, it's a limitation of msys and not of Git. You can read the details here:<br/>
https://github.com/msysgit/git/pull/110<br/>
<br/>
You can circumvent this by using another Git client on Windows or set core.longpaths to true as explained in other answers.<br/>
<br/>
git config --system core.longpaths true<br/>
<br/>
```<br/>
<br/>
NOTE: due to [https://github.com/desktop/desktop/issues/8023#issuecomment-515115353](https://github.com/desktop/desktop/issues/8023#issuecomment-515115353), Github Desktop (and potentially other Git GUIs as well) will read the `--global` config but not the `--system` config<br/>
<br/>
Git is build as a combination of scripts and compiled code. With the above change some of the scripts might fail. That's the reason for core.longpaths not to be enabled by default.<br/>
<br/>
The windows documentation at [https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd#enable-long-paths-in-windows-10-version-1607-and-later) has some more information:<br/>
<br/>
Starting in Windows 10, version 1607, MAX_PATH limitations have been<br/>
removed from common Win32 file and directory functions. However, you<br/>
must opt-in to the new behavior.<br/>
<br/>
A registry key allows you to enable or disable the new long path<br/>
behavior. To enable long path behavior set the registry key at<br/>
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled<br/>
(Type: REG_DWORD)<br/>
<br/>
Appendix - Doing it all from PowerShell - the copy-paste edition<br/>
<br/>
This is a Windows specific issue, hence the solution below should work in most Windows versions, new and old.<br/>
<br/>
Open a PowerShell window/console, and run the following:<br/>
<br/>
*(Réponse tronquée)*</t>