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

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

问题描述

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



这是我从桌面上获得的内容:

 桌面:〜/ NetBeansProjects / onlinescheduler $ git pull heroku master 
致命:'heroku'似乎不是git存储库
致命:远端意外挂断

我不能做 heroku创建因为这将创建一个单独的应用程序。如何将现有的代码与heroku关联起来(或者拉下一个全新版本)?



这个命令是做什么的?


首先,您需要遵循Heroku的快速入门指南,您可以直接从马的嘴巴中获取: https://devcenter.heroku.com/articles/quickstart



一旦你完成了第3步,回到这里。

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



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



然后,如果你想要抓取数据库,这里有一些选项。
有关导入/导出的较新Heroku说明:
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



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


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

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?

解决方案

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

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

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

This is described here: https://devcenter.heroku.com/articles/git-clone-heroku-app

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

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

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天全站免登陆