heroku git:克隆创建空的存储库 [英] heroku git:clone creates empty repository
问题描述
我在从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按钮的显示位置,复制它的底层URL,例如
使用Heroku按钮部署应用程序,并记住您创建的应用程序名称。
https://heroku.com/deploy?template=https://github.com/jamesward/heroku-connect-phone-change
- <现在extrac t https://github.com 部分,因此从上面的例子中您将剩下
它将被报告为空 - 没关系进入该项目并添加一个git
< https://github.com/jamesward/heroku-connect-phone-change 使用heroku git克隆回购:clone -a< YOUR-APP-NAME>
-
远程指向原始源,
git远程添加源
https://github.com/jamesward/heroku-connect-phone-change
拉来自远程来源
git pull原产地主人
- / blockquote>
您现在将拥有部署应用程序的代码,您可以在本地对其进行更改并将其部署回Heroku。
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.
Deploy the app with Heroku Button and remember the app name that you created.
Go back to where the Heroku Button was displayed and copy it's underlying URL eg https://heroku.com/deploy?template=https://github.com/jamesward/heroku-connect-phone-change
Now extract the https://github.com part so from the above example you'd be left with https://github.com/jamesward/heroku-connect-phone-change
Clone the repo with
heroku git:clone -a <YOUR-APP-NAME>
- it will be reported as empty - that's ok cd into the project and add a git remote pointing at the original source,
git remote add origin https://github.com/jamesward/heroku-connect-phone-change
pull from the remote origin
git pull origin master
You will now have the code for the deployed application and you can make changes to it locally and deploy it back to Heroku.
这篇关于heroku git:克隆创建空的存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!