Why is the Error Happening?
- When doing a git clone from remote repositories on Windows operating systems PowerShell and GitHub Application, the problem “Filename too long” occurs.
- It only affects Windows users because Git is compiled using MSYS. It utilizes an earlier version of the Windows API; therefore, filenames are limited to 260 characters.
How to fix it?
- Open GitHub Desktop Installation Folder, it is Usually Located in – Users / [username] / AppData
- Now Navigate to this path and Open gitconfig file in a Text Editor.
C:Users[username]AppDataLocalGitHubDesktopapp [GitHub Desktop Version]resourcesappgitetc
Under [core] Section Add longpaths = true
[core] symlinks = false autocrlf = true fscache = true longpaths = true <= Like This
Now Save and Close the file and Try to Clone Repo, It Should Work