heroku git:克隆创建空的存储库 [英] heroku git:clone creates empty repository

查看:206
本文介绍了heroku git:克隆创建空的存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在从heroku检索当前应用程序代码时遇到问题。我认为这是Heroku搞砸了,但他们的支持还没有回复(3天和数)。
但也许其他人有一个想法可能是错误的,或者如果有其他东西我可以尝试。

终端输出:

  $ heroku git:clone -a APPNAME 
从APP'APPNAME'克隆...
克隆到'APPNAME'...
警告:您似乎已经克隆了一个空的存储库。


$ git pull
你的配置指定与远程的ref'master'
合并,但是没有这样的ref被获取。

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






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

解决方案


中提取 https://kb.heroku.com/why-do-i-see-a - 消息 - 你看起来已经克隆了一个空存储库


为什么 strong>当通过我们的平台API部署到您的应用程序时发生此错误消息 - 通常这些部署是从
a Heroku Button单击部署的。




  • 使用Heroku按钮部署应用程序,并记住您创建的应用程序名称。

  • 回到Heroku按钮的显示位置,复制它的底层URL,例如
    https://heroku.com/deploy?template=https://github.com/jamesward/heroku-connect-phone-change


  • <现在extrac t https://github.com 部分,因此从上面的例子中您将剩下
    < https://github.com/jamesward/heroku-connect-phone-change 使用 heroku git克隆回购:clone -a< YOUR-APP-NAME> -

  • 它将被报告为空 - 没关系进入该项目并添加一个git
    远程指向原始源,



    git远程添加源
    https://github.com/jamesward/heroku-connect-phone-change


  • 拉来自远程来源

    git pull原产地主人


  • 您现在将拥有部署应用程序的代码,您可以在本地对其进行更改并将其部署回Heroku。

  • / blockquote>

    I'm having problems retrieving the current application code from heroku. I think it is messed up at Heroku but their support hasn't replied yet (3 days and counting). But maybe someone else has an idea what might be wrong or if there is something else I could try.

    terminal output:

    $ 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.
    

    .git/config looks fine but the local directory has no branches or other content.


    Update The issue was indeed a corrupt git repository. Heroku support re-initialized the repository which fixed all problems.

    解决方案

    Extracted from https://kb.heroku.com/why-do-i-see-a-message-you-appear-to-have-cloned-an-empty-repository

    Why This error message occurs when deploys to your application have been made via our platform API - typically these are deploys from a Heroku Button click.

    这篇关于heroku git:克隆创建空的存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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