git克隆代码报错
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/KotlinPluginActionIntegrationTests-kotlinCompileTasksCanOverrideDefaultJavaParametersFlag.gradle: Filename too long
error: unable to create file spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests-unresolvedDependenciesAreAnalyzedWhenDependencyResolutionFails.gradle: Filename too long
Checking out files: 100% (6323/6323), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
错误原因: 文件名太长,无法签出工作树警告:克隆成功,但签出失败。
解决方法
找到需要从git远程下载到本地目录的文件,切入到该文件目录下,输入:文章来源:https://www.toymoban.com/news/detail-757150.html
git config --global core.longpaths true 回车,然后再使用git重新拉取工程即可。
文章来源地址https://www.toymoban.com/news/detail-757150.html
到了这里,关于Git error: unable to create file xxx: Filename too long(git克隆代码时出现错误:无法创建文件xxx:文件名太长)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!