git heroku push code example

Example 1: git push to heroku

$ git push heroku master

Example 2: heroku git remote

heroku git:remote -a name-of-app

Example 3: deploy to heroku

$ git add .
$ git commit -m "Added a Procfile."
$ heroku login
Enter your Heroku credentials.
...
$ heroku create <app-name>
Creating arcane-lowlands-8408... done, stack is cedar
// now create procfile
//
//node app.js
// 
$ git push heroku master
-----> Node.js app detected
...
-----> Launching... done
       http://arcane-lowlands-8408.herokuapp.com deployed to Heroku

Example 4: deploying to heroku from git

$ heroku git:remote -a thawing-inlet-61413
set git remote heroku to https://git.heroku.com/thawing-inlet-61413.git

Example 5: heroku and github on termi

$ git remote rename heroku heroku-staging

Example 6: deploying to heroku from git

$ git push heroku testbranch:master