How can I pull an existing heroku application to a new development location?

Currently, I have the latest version of my code on another computer that I want to develop from (a home computer and a laptop when I leave) and I created a hero for my application on my laptop. Now I need to link my code on my desktop so that I can also click on the hero.

This is what I get from the 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 cannot do heroku create because it will create a separate application. How to link existing code to (or pull a new version from) a hero?

Why do we need a team?

+53
git-pull heroku pull
May 7 '10 at 3:45
source share
5 answers

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

Once you have gone to step 3, come back here.

Then you can enter this on the command line: heroku git:clone -a myapp

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

Then, if you also want to capture the database, here are a few options. Heroku's new import / export instructions: https://devcenter.heroku.com/articles/heroku-postgres-import-export

Old heroic instructions for 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

+42
Sep 11 '12 at 16:26
source share

In addition, if you have never used a hero before on another machine, you first need to do a few things:

  $ gem install heroku 
  $ heroku login
  [then enter your credentials] 
  $ heroku keys: add [path to keyfile] 

Now you can clone the remote repository:

  $ git clone git@heroku.com: <heroku_app> .git <local_directory> 
+111
Feb 07 '11 at 7:25
source share

If you first need to get the app from Heroku, clone your app.

To do this, write in your terminal:

 heroku git:clone -a your_app_name 

If you already have an application and a remote for the hero, follow these steps. If not, you can check the instructions here https://devcenter.heroku.com/articles/git

  • Find your database name

Write in your terminal:

 heroku pg:info -a your_app_name 

it will look something like this:

 HEROKU_POSTGRESQL_MAROON_URL 
  1. Find the name of your local database

In a Rails application, go to config / database.yml

it will look something like this:

 your_app_name_development 
  1. Cloning your production database (PostgreSQL)

Write your own database names in your Terminal:

 heroku pg:pull HEROKU_POSTGRESQL_MAROON_URL your_app_name_development -a your_app_name 

HEROKU_POSTGRESQL_MAROON_URL - an example of how the name of your production database (in Heroku) could be: my_app_name_development - the name of your development database (locally) the_name_of_my_app is the name of your application in Heroku

Remember to complete this by installing the package ...

+3
May 13 '15 at 10:37
source share

If you already have a ready-made code base and have a hero setup, use:

 $ heroku git:remote -a your_heroku_app 

This will allow you to deploy a new location. Link: https://devcenter.heroku.com/articles/git#creating-a-heroku-remote

+3
Jun 22 '15 at 10:18
source share

Once you create the key on a new computer, you must load the new SSH key by typing heroku keys:add .

0
Aug 17 '12 at 11:00
source share



All Articles