$ git clone http://mySite.com/dirWhereTheRepoIs,如何通过http克隆回购?

时间:2012-01-23 15:29:37

标签: git

创建试用.git -repo

$ mkdir Test; cd Test; git init
$ echo "Just dummy test file" > test1; git add .
$ git commit -m "cloning soon through http, this repo is in public_html -dir" 
$ pwd
/users/hhh/public_html

现在尝试克隆它

$ git clone http://mysite.com/hhh/Test/
Cloning into Test...
fatal: http://mysite.com/hhh/Test/info/refs not found: did you run git update-server-info on the server?
$ git update-server-info
$ git clone http://mysite.com/hhh/Test/
Cloning into Test...
fatal: http://mysite.com/hhh/Test/info/refs not found: did you run git update-server-info on the server?

如何克隆那样的回购?

1 个答案:

答案 0 :(得分:2)

设置并使用SmartHTTP - http://progit.org/2010/03/04/smart-http.html

SmartHTTP现在已成为标准。