当前位置:   article > 正文

[Git] warning: Clone succeeded, but checkout failed.

warning: clone succeeded, but checkout failed.

在 windows 上 git clone 后报错如下:

remote: Enumerating objects: 720, done.
Receiving objects:  91% (656/720), 29.19remote: Total 720 (delta 0), reused 0 (delta 0), pack-reused 720
Receiving objects: 100% (720/720), 29.57 MiB | 1.59 MiB/s, done.
Resolving deltas: 100% (447/447), done.
fatal: cannot create directory at 'checkpoints/Breakout-v0/min_delta--1/max_delta-1/history_length-4/train_frequency-4/target_q_update_step-10000/memory_size-1000000/action_repeat-4/ep_end_t-1000000/backend-tf/random_start-30/scale-10000/env_type-simple': Filename too long
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

原因是有个文件名的路径过长。解决办法:

进入文件夹的目录中,执行

git config core.longpaths true
git status
git restore --staged .
git restore .
  • 1
  • 2
  • 3
  • 4
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/891246
推荐阅读
相关标签
  

闽ICP备14008679号