Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add a Heroku remote to an existing git repo
$ git remote add staging https://git.heroku.com/staging-app.git
$ git remote add heroku https://git.heroku.com/app.git
@theochampion

This comment has been minimized.

Copy link

theochampion commented Jun 12, 2018

Thanks for the gist! Quick question tho, when I do that and then git push heroku master nothing is pushed to heroku:master and the build threfore fail, what step I am missing here ?

@Saworieza

This comment has been minimized.

Copy link

Saworieza commented Dec 13, 2018

Hi. I found that this method is slightly misleading.
git remote add heroku git@heroku.com:app-name.git
works much better. doesn't add two apps to your remote and is straightforward

@voke

This comment has been minimized.

Copy link

voke commented Nov 11, 2019

Another way is to run heroku git:remote app-name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.