Win10和11 git/Android Studio遇到filename too long问题的解决

1、打开windows长文件、长路径支持:

可以参考这篇文章:

复制代码
修改注册表方法:
使用Admin登陆machine,在run中输入regedit并回车;
找到路径 'Computer -> HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Control -> FileSystem';
在右边属性字段中找到'LongPathsEnabled'字段,选择并右键编辑;
在弹出的编辑窗口中,修改Value Data为1并保存。
 

 

修改Local Group Policy方法:
使用admin登陆machine,在run中输入gpedit.msc并回车;
在弹出的local group policy editor中,找到路径'Computer Configuration -> Administrative Templates -> System -> Filesystem';
并在右边setting中选择'Enable Win32 long paths'并双击;
在弹出的窗口中选择'Enabled'并保存。

------------------------------------------------

                            版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
                        
原文链接:https://blog.csdn.net/WarmSunshine7/article/details/112739608

如何在Windows10上修改文件路径260字符的限制?_the file names would be too long for the destinati-CSDN博客

2、然后在git中打开长路径支持:

复制代码
git config --system core.longpaths true
相关推荐
司徒小夜11 小时前
处理git没做修改,但是文件显示变更的情况
git
m0_7493175212 小时前
vscode里如何用git
ide·git·vscode
Hello.Reader12 小时前
Git 安装全攻略Linux、macOS、Windows 与源码编译
linux·git·macos
王景程13 小时前
SELinux是什么以及如何编写SELinux策略
git·github
Chuncheng's blog13 小时前
如何基于Mihomo Party http端口配置git与bash命令行代理
git·http·bash
Tom Boom14 小时前
Git常用命令完全指南:从入门到精通
大数据·git·elasticsearch·docker·自动化测试框架
不爱学英文的码字机器15 小时前
[Git] 文件删除
git
DZSpace16 小时前
git stash命令用法
git
Vowwwwwww16 小时前
GIT历史存在大文件的解决办法
前端·git·后端
@BreCaspian17 小时前
Git 推送失败解决教程——error: failed to push some refs to
大数据·git·elasticsearch