当前位置:   article > 正文

解决Windows下“fatal: unable to checkout working tree, warning: Clone succeeded, but checkout failed._fatal: unable to checkout working tree warning: cl

fatal: unable to checkout working tree warning: clone succeeded, but checkou

解决Windows下“fatal: unable to checkout working tree, warning: Clone succeeded, but checkout failed.

因为我的仓库中的一个read文件的路径太长,导致clone到本地之后无法checkout,而在Ubuntu下没有任何问题,在这里吐槽一下Windows.

git clone xxx.git
Cloning into 'xxx'...
remote: Enumerating objects: 1503, done.
remote: Counting objects: 100% (210/210), done.
remote: Compressing objects: 100% (156/156), done.
remote: Total 1503 (delta 72), reused 182 (delta 47), pack-reused 1293
Receiving objects: 100% (1503/1503), 1.42 GiB | 592.00 KiB/s, done.
Resolving deltas: 100% (583/583), done.
error: invalid path 'trajectory/paper/An Introduction to Trajectory?
Optimization: How to Do Your?
Own Direct Collocation.pdf'
fatal: unable to checkout working tree
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
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

操作方法:

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

闽ICP备14008679号