I'm attempting to deploy my Java web app on Heroku. When I was making a tutorial I've created an app using heroku create command, lets say it wasy "name-app1". Then I removed it after the tutorial and create the new one to deploy it let it be: "new_app". However, when I attempt to do anything like upload my code there was an error that previous app "name-app1" does not exist anymore. When I try to use for e.g. heroku logs there is following error:
» Error: Missing required flag:
» -a, --app APP app to run command against
» See more help with --help
I tired to point at my new app with following command:
git remote set-url heroku [email protected]:hidden-ridge-8790.git
I think I messed up something and don't know how to fix it.
The way you try to set your remote for heroku is incorrect. That is why you get the above error. To set your remote correctly use the below command
heroku git:remote -a new_app
This will set your remote to newly crated app new_app
To deploy the code use below command
git push heroku master
This will deploy your code to heroku app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With