When I clone my repository via GitHub Desktop it throws error that there is a file which name is too long ,I know that the file limit is 255 and I disabled it from regedit and from policy editor but the problem still occurs and i dont know what to do
For anyone who is wondering how to fix this I found a way! Go to your GitHub Desktop Folder -> app -> resources -> app -> git -> mingw64 -> etc -> gitconfig , and there under [core] section add this field "longpaths = true" :)
Go to your GitHub Desktop Folder -> app -> resources -> app -> git -> etc -> gitconfig
And there under [core] section add this field "longpaths = true"
For My case:
Path Is:
C:\Users\username\AppData\Local\GitHubDesktop\app-3.0.7\resources\app\git\etc
And updated file (gitconfig) format:
[core]
symlinks = false
autocrlf = true
fscache = true
longpaths = true
Go to GitHubDesktop Folder (located in AppData\Local\GitHubDesktop) > app > resources > app > git > etc > gitconfig
C:\Users\YourUser\AppData\Local\GitHubDesktop\app-3.1.6\resources\app\git\etc
Open 'gitconfig' with any program that works (I opened it with Windows NotePad) and add "longpaths = true
" in the [core] section
Then save the file. Open GitHub Desktop again and it will work:)
If you are using GitHub Desktop and facing "file name too long" issue while check-in the code. Apply following solution it works. Go to - Repository-> Show in Explorer -> .git Edit config file with any editor(eg- Notepad++) - under [core] section add this field "longpaths = true"
[core] longpaths = true
© 2022 - 2025 — McMap. All rights reserved.