I want to do this action:
using Heroku CLI.
If I have the remote git on my computer I can do git push my-heroku-remote master
But because my heroku app is already connected to the git project, I find this approach redundant.
Any ideas?
You can configure GitHub integration in the Deploy tab of apps in the Heroku Dashboard. To configure GitHub integration, you have to authenticate with GitHub. You only have to do this once per Heroku account. GitHub repo admin access is required for you to configure automatic GitHub deploys.
You can now push your project to GitHub and it will be automatically deployed to Heroku henceforth.
Heroku Button is no longer limited to source code hosted in public GitHub repos. It now works with both public and private GitHub repos.
I prefer the GitHub auto-deployment over the git push heroku master
because it works great with a GitHub Flow (Pull Requests to master). But if you would rather do manual deployments to Heroku from your dev machine you can fetch and push:
git fetch origin master:master
git push heroku master:master
(Assuming the GitHub remote is named origin
and the Heroku remote is named heroku
.)
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