克隆私人github回购时出错 [英] cloning error when checking out private github repo

查看:129
本文介绍了克隆私人github回购时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的同事电脑上克隆私人回购时出现以下错误:

 克隆到xxx ... 
remote:计数对象:7112,完成。
remote:压缩对象:100%(4870/4870),完成。
remote:合计7112(delta 2281),重用6503(delta 1672)
接收对象:100%(7112/7112),10.88 MiB | 975 KiB / s,完成。
解析三角洲:100%(2281/2281),完成。
错误:refs / remotes / origin / master没有指向有效的对象!
错误:尝试使用不可变对象编写ref refs / heads / master 5f1f9967f0d76f1f5af4ebc1d1b0dd5dcbf593c5
致命:无法更新ref'HEAD'。

它可以在我自己的计算机上正常工作,但我无法弄清楚问题所在,似乎没有连接到回购本身。因为它在其他计算机上克隆得很好。



更改我签出的目录似乎并不适用于战斗机。


  • 操作系统:Mac OSX Lion系统:Macbook Pro(2011年7月)8GB RAM



$ git版本
git版本1.7.5.4

解决方案

答案:

我创建了一个分支,(git checkout -b master2)然后推送分支。然后,我删除了主人,并将其更名为master2。



终于可以工作了。


I get the following error while cloning a private repo on my colleagues computer:

Cloning into xxx...
remote: Counting objects: 7112, done.
remote: Compressing objects: 100% (4870/4870), done.
remote: Total 7112 (delta 2281), reused 6503 (delta 1672)
Receiving objects: 100% (7112/7112), 10.88 MiB | 975 KiB/s, done.
Resolving deltas: 100% (2281/2281), done.
error: refs/remotes/origin/master does not point to a valid object!
error: Trying to write ref refs/heads/master with nonexistant object 5f1f9967f0d76f1f5af4ebc1d1b0dd5dcbf593c5
fatal: Cannot update the ref 'HEAD'.

It works fine on my own computer, and i can't figure out what the problem is, it does not seem to be connected to the repo itself. As it clones fine on other computers.

Changing the directory where i check out in doesn't seem to work fighter.

  • O/S: Mac OSX Lion
  • System: Macbook Pro (Jul 2011) 8GB Ram

$ git version git version 1.7.5.4

解决方案

The answer:

I created a branch, (git checkout -b master2) then pushed the branch. Then i deleted master and renamed master2 to master.

Finally worked.

这篇关于克隆私人github回购时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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