Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 313
Piotr Dobrogost Avatar asked Oct 23 '12 22:10

Piotr Dobrogost


1 Answers

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.

like image 59
Simon Boudrias Avatar answered Sep 25 '22 16:09

Simon Boudrias