Anconia Anconia - 1 year ago 117
Ruby Question

Changing heroku repo for pre-existing app

I created a heroku repo some time ago for my rails app but deleted it because I was never using it. Now I have come to the point where I need to use heroku but I am encountering the following error:

! No such app as furious-mist-2295.
which was the old repo name, so it is clearly not pushing to the new stack I created.

This is what I was considering trying, but am concerned about causing unnecessary changes to my git repo.

git remote rm origin

git remote add origin <URL to new heroku app>

git push -u origin master

Answer Source

Turns out it can be done with the following commands

git remote rm heroku

git remote add heroku

Which is quite a simple little fix. Seemed rather difficult without knowing beforehand that these commands existed.

git remote -v came in handy to double check which repos in git and heroku were being pushed and fetched.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download