Changing heroku replication for an existing application

I created a heroku replica some time ago for my rails application, but deleted it because I never used it. Now I have come to the point that I need to use the hero, but I encountered the following error:

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

This is what I considered while trying, but worried about causing unnecessary changes in my git repository.

git remote rm origin

git remote add origin <URL to new heroku app>

git push -u origin master

+6
source share
1 answer

It turns out that this can be done using the following commands

git remote rm heroku

git remote add heroku git@heroku.com :new-application.git

This is a pretty simple fix. It was quite difficult, not knowing in advance that these teams exist.

git remote -v comes in handy to double check which repositories in git and heroku were pushed and checked out.

+6
source

Source: https://habr.com/ru/post/919716/


All Articles