-
Notifications
You must be signed in to change notification settings - Fork 0
Using Github with Heroku
Gabriele Labanca edited this page Dec 29, 2017
·
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 master
- create locally a new branch:
git checkout -b deploy-heroku
,git add -A
,git commit -m "create deploy-heroku"
- push:
git push origin deploy-heroku
A Turn Into Coders project