试图在git中克隆存储库,出现错误 [英] Trying to clone a repository in git, getting a error
问题描述
我有两个盒子,一个是我的本地机器,另一个是我的开发服务器。现在我正在测试此使用Git部署应用程序的方法
我设置了本地存储库,添加了随后提交的文件。我在Windows 7&我的服务器是Windows Server 2008.
服务器映射为W:\ Drive与我的'裸'存储库和我的目标'mock'生产文件夹作为子文件夹。
- 我可以对每个人都很好,没有连接问题。
以下是我设置所有内容的步骤: 本地目录git remote add origin w:\ gitCentral 本地目录git push origin master 键入C :,然后键入CD testDeployment 现在我在我的测试文件夹中。 一种。我做git克隆w:/ gitCentral
克隆到gitCentral ... done。
error:refs / remotes / origin / master does
不能指向一个有效的对象!错误:
尝试写入ref refs / heads / master
with nonexistant object 559e2165845
06e14ebef1121059e9461a86dd4f8致命:
无法更新ref'HEAD'。
试着做以下(从本地文件夹开始,考虑它是一个git仓库,并提交了当前的HEAD):
git remote add origin w:/ gitCentral
git fetch origin
git push origin master
cd C:/ testDeployment
git clone w:/ gitCentral
I have two boxes, one is my local machine and the other is my dev server. Right now I'm testing this method of deploying apps using Git
I setup my local repository, added the files then committed. I am on Windows 7 & my server is Windows Server 2008.
The server is mapped as the W:\ Drive with my 'bare' repository and my target 'mock' production folder as child folders. -- I can get to each just fine, no connection problems.
Here's what I did to setup everything:
Local dir git remote add origin w:\gitCentral
Local dir git push origin master
Type C:, then type CD testDeployment
Now I'm in my test folder.
A. I do git clone w:/gitCentral
Cloning into gitCentral... done.
error: refs/remotes/origin/master does
not point to a valid object! error:
Trying to write ref refs/heads/master
with nonexistant object 559e2165845
06e14ebef1121059e9461a86dd4f8 fatal:
Cannot update the ref 'HEAD'.
try to do the following (starting from your local folder, considering it is a git repo and has commits in current HEAD):
git remote add origin w:/gitCentral
git fetch origin
git push origin master
cd C:/testDeployment
git clone w:/gitCentral
这篇关于试图在git中克隆存储库,出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!