I create a heroku app and then my machine crashed. I have a new machine. How do I attach my existing app to heroku app. When I visit heroku page the url for my app is like this
[email protected]:myapp.git
I can't do clone this app because I already have myapp
from github. So I need to add heroku as remote to my existing github app. Anyone knows the syntax.
Open Deploy tab and scroll to the “Deployment method” section. Select GitHub as the method. It will show a “Connect to GitHub” option where we can provide our GitHub repository. If you are doing it for the first time, Heroku will ask permission to access your GitHub account.
To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.
Heroku Button is no longer limited to source code hosted in public GitHub repos. It now works with both public and private GitHub repos.
If you've heroku toolbelt:
If you're using the Heroku Toolbelt, the newer syntax is
heroku git:remote -a project
See this for more.
Credits: user101289
's solution
Else if you don't have heroku toolbelt:
First do this:
git remote add heroku [email protected]:{heroku-app-name}.git
Then do this:
git push heroku master heroku open
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