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

images/screenshot_remotes_pre.png

Now rename Heroku remote (here "origin"): git remote rename origin heroku-origin, then check again remotes:

images/screenshot_remotes_post.png

  • add Github remote: git remote add origin https://github.com/green-cani/green_tracker
  • pull git pull origin: this pulls all the branches; run git checkout deploy-heroku to check.