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.

  • Why isn't 'git bisect' branch aware?
  • Git will escape the backslash on my remote path for Network
  • git ignore vim temporary files
  • sh.exe": emacs: command not found (Git bash Windows)
  • Does git push from local to remote compress data?
  • How to get just one file from another branch
  • 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

  • My pull request has been merged, what to do next?
  • Eclipse hangs on “Re-indexing (fully) repository {username}”
  • Changing repository description in git
  • Confused by 'up-to-date' message in git workflow
  • github Diff Truncated error
  • How to set a git branch to push to a remote with a different branch name and pull from completely different url
  • One Solution collect form web for “Changing heroku repo for pre-existing app”

    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.

    Git Baby is a git and github fan, let's start git clone.