尝试heroku git:在heroku fork产生一个空的存储库后克隆 [英] Trying to heroku git:clone after heroku fork yields an empty repository

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

问题描述

我刚刚跑过:

I just ran:

$ heroku fork -a oldapp newclonedapp

,它运行良好并运行等现在我想拉代码来工作
[我认识到heroku是不是版本控制我通常使用github来做这件事,但在这种情况下,我需要从clone中获取代码],并且当我尝试时:

and it worked fine and runs etc. Now I want to pull the code down to work on it [I realize heroku is not for version control and I usually use github for this but in this case I need to get the code from the clone] and when I try:

$ heroku git:clone -a newclonedapp

我得到:


警告您似乎已经克隆了一个空目录

warning you have appeared to have cloned an empty directory

和新的newclonedapp目录确实是空的。

and the new newclonedapp directory is empty indeed.

我做错了什么?

what am I doing wrong?

推荐答案

你没有做错任何事,这是一个叉的已知问题,它不克隆源应用程序库。在问题解决之前,您需要手动克隆源存储库。以下是我该怎么做的:

You're not doing anything wrong, it's a known issue of fork that it doesn't clone the source app repository. Until the issue is resolved, you'll need to manually clone the source repository. Here's how I'd do it:

$ git clone git@heroku.com:oldapp.git -o old newclonedapp
$ cd newclonedapp
$ heroku git:remote -a newclonedapp
$ git push heroku master

基本上,您可以将原始资源库克隆到新的应用程序目录,设置 heroku git remote并推送它以填充新的应用程序资源库。

Basically, you clone the original repo to a new app directory, setup the heroku git remote and push to it to populate the new app repo.

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

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