When cloning git repo under Windows I get “error: unable to create file <file>… (Is a directory)”

久未见 提交于 2019-12-07 10:55:52

问题


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 version 1.8.0.msysgit.0, Windows Vista SP2 x64

What's wrong?


回答1:


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

... is not a valid filename under windows

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

git clone -n git://repo

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



来源:https://stackoverflow.com/questions/13040577/when-cloning-git-repo-under-windows-i-get-error-unable-to-create-file-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!