如何将现有的 heroku 应用程序拉到新位置进行开发? [英] How can I pull an existing heroku app to new location for development?

查看:26
本文介绍了如何将现有的 heroku 应用程序拉到新位置进行开发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在另一台计算机上有我想要开发的最新版本的代码(家用计算机和笔记本电脑,当我外出时)我在我的笔记本电脑上为我的应用程序设置了 heroku.现在我需要在我的桌面上关联我的代码,以便我也可以从那里推送到 heroku.

I currently have the latest version of my code on another computer that I want to develop from (Home computer and laptop for when I'm out and about) I set up heroku for my app on my laptop. Now I need to associate my code on my desktop so that I can push to heroku from there as well.

这是我从我的桌面上得到的:

This is what I get from my desktop:

desktop:~/NetBeansProjects/onlinescheduler$ git pull heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

我不能做 heroku create 因为这会创建一个单独的应用程序.我如何将现有代码与 heroku 相关联(或从中提取全新版本)?

I can't do heroku create because that will create a separate app. How do I associated the existing code with (or pull down a brand new version from) heroku?

执行此操作的命令是什么?

Whats the command to do this?

推荐答案

首先,您需要按照 Heroku 的快速入门说明进行操作,您可以直接从这里获得该说明:https://devcenter.heroku.com/articles/quickstart

First of all, you'll want to follow the Quick Start instructions for Heroku, which you can get straight from the horse's mouth, right here: https://devcenter.heroku.com/articles/quickstart

完成第 3 步后,请返回此处.

Once you've gotten through step 3, come back here.

然后,您可以在命令行中输入:heroku git:clone -a myapp

Then, you can type this into the command line: heroku git:clone -a myapp

这里是这样描述的:https://devcenter.heroku.com/articles/git-clone-heroku-app

然后,如果您也想获取数据库,这里有一些选项.较新的 Heroku 导入/导出说明:https://devcenter.heroku.com/articles/heroku-postgres-import-export

Then, if you want to grab the database too, here are some options. Newer Heroku instructions on import/export: https://devcenter.heroku.com/articles/heroku-postgres-import-export

关于推和拉的旧 heroku 说明:https://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku

Older heroku instructions on push and pull: https://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku

如果您使用 mongo,这是同步 mongo 数据库的有用工具:https://github.com/pedro/heroku-mongo-sync#readme

If you are using mongo, this is a useful tool to sync your mongo database: https://github.com/pedro/heroku-mongo-sync#readme

这篇关于如何将现有的 heroku 应用程序拉到新位置进行开发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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