您的位置:首页 > 其它

使用git clone一个空的裸仓库碰到意外的报错现象

2013-06-07 12:55 399 查看
fedora 9 系统环境下

[root@localhost Handset]# git clone git@server_ip:zs_test

Initialized empty Git repository in /root/git_work/Handset/zs_test/.git/

fatal: no matching remote head

fetch-pack from 'git@server_ip:zs_test' failed.

[root@localhost Handset]# git --version

git version 1.5.4.5

ubuntu 11.10 系统环境下

camille@Product:~/git-95-admin/gitolite-admin$ git clone git@server_ip:zs_test

Cloning into zs_test...

warning: You appear to have cloned an empty repository.

camille@Product:~/git-95-admin/gitolite-admin$ git --version

git version 1.7.5.4

我先向zs_test 提交进文件,然后在fedora 9端clone ,结果就成功了。

事实上已经证明:fedora 9上面的git版本过低,导致无法clone一个空的裸仓库。当然即便在较新git版本中你去clone 一个裸仓库也是会警示你的。

随后我升级了fedora 9 上git ,将其升级成为1.7.8 ,然后去clone一的空的裸仓库,ok,成功了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Git
相关文章推荐