Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I pull an existing heroku app to new location for development?

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?

like image 325
aarona Avatar asked May 07 '10 03:05

aarona


People also ask

Can I change region of Heroku app?

Fork applicationBegin the verification phase by forking the application to create a copy in another region, for example the eu region. This will copy all Heroku Postgres data and config vars and will re-provision all add-ons. Depending on the size of your database this process may take some time.

How do I clone a Heroku code?

Just go to https://dashboard.heroku.com/apps/YOUR_APP_NAME/deploy/heroku-git. If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key. Use Git to clone YOUR_APP_NAME's source code to your local machine.

How do I push Heroku to another branch?

To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.


1 Answers

Also, If you've never used heroku before on the other machine, you'll need to do a few more things first:

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

Now you can clone the remote repository:

$ git clone [email protected]:<heroku_app>.git <local_directory>
like image 120
Gayle Avatar answered Nov 05 '22 03:11

Gayle