Using Github with Heroku - green-cani/green_tracker GitHub Wiki
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.
Cheat sheet
- 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
Configuration
- 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.