Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 515
Anconia Avatar asked Jul 05 '12 02:07

Anconia


1 Answers

Turns out it can be done with the following commands

git remote rm heroku

git remote add heroku [email protected]:new-application.git

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.

like image 98
Anconia Avatar answered Oct 12 '22 23:10

Anconia