300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 解决Windows下“fatal: unable to checkout working tree warning: Clone succeeded but checkout failed.”

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

时间:2024-03-11 03:12:49

相关推荐

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

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

git clone xxx.gitCloning 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 1293Receiving 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 treewarning: Clone succeeded, but checkout failed.You can inspect what was checked out with 'git status'and retry with 'git restore --source=HEAD :/'

从错误提示中可以看出,由于一个文件导致的问题。

操作方法:

git resetgit config core.protectNTFS falsegit checkout

上网百度相关的答案,搜到几个答案都要付费才能看,这真是一个知识付费的年代!!!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。