Git克隆显示错误并在Windows 10中将文件标记为已删除 [英] Git clone displaying errors and marking files as deleted in Windows 10
问题描述
尝试使用git克隆存储库时出现以下错误:
I am getting the following error when trying to clone a repository with git:
Fatal: Unable to checkout working tree
warning: Clone succeeded, but failed checkout.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
此外,以下消息还会出现在多个文件中:错误:无法创建文件"
Additionally, the following message appears in several files: 'error: Unable to create file'
http://i.imgur.com/vz13IMe.png
通过使用'git status'命令,我看到许多文件被标记为已删除[实际上文件仍然存在]
By using the 'git status' command, I see that many files were marked as deleted [actually the files still exist]
http://i.imgur.com/KoizHw0.png
我按照第一个错误的要求使用了git checkout -f HEAD
命令,但结果如下:
I used the git checkout -f HEAD
command as was requested in the first mistake, but the result was the following
http://i.imgur.com/miFEgMr.png
推荐答案
显然,存储库中的文件名称中包含问号(?
).问号是一个特殊符号,在Windows上的文件名中不允许.
Apparently, the files in your repository contain question marks (?
) in their names. The question mark is a special symbol and is not permitted in a file name on Windows.
Afaik,没有解决您的问题的方法(除了使用其他操作系统外).
Afaik, there is no solution for your problem (apart from using a different OS).
但是,为什么文件名包含问号?它们看起来好像是由网络蜘蛛(在其他OS上)从网络上丢弃的.问号及其后的片段不应成为文件名的一部分.
However, why the filenames contain question marks? They look like they were scrapped from web by a web spider (on a different OS). The question mark and the fragment after it should not be part of the file names.
这篇关于Git克隆显示错误并在Windows 10中将文件标记为已删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!