-
Notifications
You must be signed in to change notification settings - Fork 0
Using Github with Heroku
Gabriele Labanca edited this page Jan 8, 2018
·
7 revisions
Heroku offers an automatic way of deploying apps from Github. This allows to easily manage the code on Github, while deploying only when code is ready.
- push code on Github:
git push origin master
- push code on Heroku (deploy):
git push heroku-origin master
- push code on Github to be automatically deployed on Heroku:
git push origin deploy-heroku
- create repository on Github: https://github.com/green-cani/green_tracker
- locally, in the app repository run
git remote -v
to see current remotes.
Now rename Heroku remote (here "origin"): git remote rename origin heroku-origin
, then check again remotes:
- add Github remote:
git remote add origin https://github.com/green-cani/green_tracker
- pull
git pull origin
: this pulls all the branches; rungit checkout deploy-heroku
to check.
A Turn Into Coders project