heroku git:clone创建空存储库

Ron*_*nny 6 git heroku

我在从heroku检索当前应用程序代码时遇到问题.我认为它在Heroku搞砸了但是他们的支持还没有回复(3天和数量).但也许其他人知道可能出现的问题,或者我还能尝试其他什么.

终端输出:

$ heroku git:clone -a APPNAME
Cloning from app 'APPNAME'...
Cloning into 'APPNAME'...
warning: You appear to have cloned an empty repository.


$ git pull
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.
Run Code Online (Sandbox Code Playgroud)

.git/config看起来很好,但本地目录没有分支或其他内容.


更新 问题确实是一个损坏的git存储库.Heroku支持重新初始化了修复所有问题的存储库.

Jai*_*udo 11

摘自 https://help.heroku.com/XOBUHLKQ/why-do-i-see-a-message-you-appear-to-have-cloned-an-empty-repository-when-using-heroku-git-克隆

为什么在通过我们的平台API部署到您的应用程序时会出现此错误消息 - 通常这些消息来自Heroku按钮单击.


Nee*_*mar 5

您可以使用heroku slog下载。请参考https://help.heroku.com/FZDDCBLB/how-can-i-download-my-code-from-heroku

首先,安装 heroku-slugs CLI 插件

heroku plugins:install heroku-slugs
Run Code Online (Sandbox Code Playgroud)

,然后运行:

heroku slugs:download -a APP_NAME
Run Code Online (Sandbox Code Playgroud)

这将下载您的 slug 并将其压缩到具有该app名称的目录中。


mic*_*has -2

看起来您只是克隆了一个空存储库。

你可以自己尝试一下。创建一个空存储库 ( git init a),克隆该空存储库 ( git clone a b) 并尝试从中提取 ( cd b; git pull)。

这应该给出与你的情况完全相同的结果。

您确定您曾经向该应用程序推送过任何代码吗?这真的是您想要的应用程序吗?

您还可以尝试创建另一个新应用程序,推送提交,并检查是否能够将其克隆到新目录中。也许这会让您知道可能出了什么问题。