Skip to content

Instantly share code, notes, and snippets.

@AlexB52
Last active January 16, 2017 06:10
Show Gist options
  • Save AlexB52/b7771e7d2238620043d7e988143ab415 to your computer and use it in GitHub Desktop.
Save AlexB52/b7771e7d2238620043d7e988143ab415 to your computer and use it in GitHub Desktop.

Heroku Command line

Commands Actions
Basics ---
heroku update Update comman-line tool
heroku help Help
Get started ---
heroku create --stack cedar [<appname>] Create app
git push heroku master Deploy app
git push heroku my_branch:master Deploy branch other than master
heroku open Open App in Web browser
Info About app ---
heroku info Basic App info
heroku config View App config
heroku ps Show state of App - number of dynos and addons
heroku logs Show logs
Advanced ---
heroku run bash ssh to app
heroku run rails console access rails console
heroku run rails console --remote staging access rails console on staging
heroku run rake task:name run task on Heroku
heroku db:pull Pull Database
heroku db:push Push Database
heroku ps:scale web=1 Scale web process
heroku config:add TZ=America/Vancouver Set timezone for app. (Use TZ time zones from here [wikipedia].)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment