Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 33 Next »

Summary

Windows does not allow having paths longer than 260 characters by default. On Windows 10 registry fix and the Group Policy Editor preference (and rebooting?), you must enable core.longpaths in Git for Windows and possibly other Git clients you may be using.

Solution


Step 1: Run Registry Modifier

Download and run this script to apply the fix –>  Remove 260 Character Path Limit.reg

Reverting

If you need to go back for some reason, run this file:

Restore 260 Character Path Limit (Default).reg


*  Solution source: https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/

Step 2: Set "Enable Win32 longs paths" to Enabled

Hit Windows key. Type "Edit Group Policy", hit Enter.

Under Computer Configuration > Administrative Templates > System > Filesystem

Right click Enable Win32 long paths, Edit, set to Enabled.

Step 3: Set Git configuration core.longpaths = true 

Set core.longpaths to true.

See Git#Configuration for help working with Git configuration.


In a terminal launched with Administrator mode.

* Solution source: https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows

More Info

https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path

Example error


  • No labels