If this error pops up, its because there is no remote named Heroku. When you do a Heroku create, if the git remote doesn’t already exist, we automatically create one (assuming you are in a git repo). To view your remotes type in:
“git remote -v
”. # For an app called ‘appname’ you will see the following:
$ git remote -v
heroku [email protected]:appname.git (fetch)
heroku [email protected]:appname.git (push)
If you see a remote for your app, you can just “git push master
” and replace with the actual remote name.
If it’s missing, you can add the remote with the following command:
git remote add heroku [email protected]:appname.git
If you’ve already added a remote called Heroku, you may get an error like this:
fatal: remote heroku already exists.
so, then remove the existing remote and add it again with the above command:
git remote rm heroku
Hope this helps…
git remote -v
to see what remotes you have set up.heroku git:remote -a <yourapp>
command and you are good to go