在Windows下克隆git repo时,出现“错误:无法创建文件< file> ...(是目录)". [英] When cloning git repo under Windows I get "error: unable to create file <file>... (Is a directory)"

查看:122
本文介绍了在Windows下克隆git repo时,出现“错误:无法创建文件< file> ...(是目录)".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Z:\>git clone git://github.com/kennethreitz/httpbin.git
Cloning into 'httpbin'...
remote: Counting objects: 1073, done.
remote: Compressing objects: 100% (401/401), done.
remote: Total 1073 (delta 672), reused 1045 (delta 651)
Receiving objects: 100% (1073/1073), 114.42 KiB | 128 KiB/s, done.
Resolving deltas: 100% (672/672), done.
error: unable to create file httpbin/templates/... (Is a directory)

git版本1.8.0.msysgit.0,Windows Vista SP2 x64

git version 1.8.0.msysgit.0, Windows Vista SP2 x64

怎么了?

推荐答案

我认为麻烦是此文件位于您的仓库中:

I think the trouble is this file here in you repo: https://github.com/kennethreitz/httpbin/blob/master/httpbin/templates/...

...在Windows下不是有效的文件名

... is not a valid filename under windows

为了获取存储库,请克隆而不签出文件(带有-n标志):

In order to get the repo, clone without checking out files (with -n flag):

git clone -n git://repo

然后,您可以使用sparse-checkout来获取除...之外的所有文件,或者只能获取实际需要的git checkout文件.

Then you could use a sparse-checkout to get all file but ..., or you could only git checkout file you actually need.

这篇关于在Windows下克隆git repo时,出现“错误:无法创建文件< file> ...(是目录)".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆