Instructions for Windows 11 and Windows 10
Method 1: Registry Editor (Most Reliable)
- Press
Win + R
, typeregedit
, and press Enter - Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
- Find
LongPathsEnabled
(create it if missing as DWORD) - Set value to
1
- Restart your computer
Method 2: PowerShell (Administrative) Run PowerShell as Administrator:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Method 3: Group Policy (Pro/Enterprise)
- Press
Win + R
, typegpedit.msc
, and press Enter - Navigate to:
Computer Configuration > Administrative Templates > System > Filesystem
- Open
Enable Win32 long paths
- Set to
Enabled
Note: Developer Mode in Windows 11 Settings does not enable long paths - this is a common misconception.
Windows 10 Home: Use the Registry method above
Windows 10 Pro/Enterprise: Use either Registry or Group Policy method
After enabling system-wide long paths, configure Git:
System-wide (affects all users):
git config --system core.longpaths true
Per user (optional):
git config --global core.longpaths true
Per repository (current repo only):
git config core.longpaths true
- Restart required: Changes take effect after reboot
- Application support: File Explorer still doesn't fully support long paths - mainly benefits command-line tools and compatible applications
- Path limit: Maximum supported path length is approximately 32,767 characters
- Compatibility: Some older applications may still have issues with long paths
Tested same on Windows 11 Pro 22H2 and it works. Thanks.