Skip to content

Instantly share code, notes, and snippets.

@interactivellama
Last active March 20, 2023 14:33
Show Gist options
  • Save interactivellama/cb6f7da2b35bb0a06a80 to your computer and use it in GitHub Desktop.
Save interactivellama/cb6f7da2b35bb0a06a80 to your computer and use it in GitHub Desktop.
Heroku commands
#Create new app
heroku apps:create [app-name]
# Change to development mode (install devDependencies in nodee)
heroku config:set npm_config_production=false
# Push a local branch that is not master
git push heroku [local-branch]:master
# Add existing Heroku app
git remote -add heroku git@heroku.com:[app-name].git
# Open default browser
heroku open
# Install NPM modules again
heroku run npm rebuild
# Uploads empty repo. Then, uploads local repo. See https://github.com/heroku/heroku-repo
heroku repo:rebuild -a [app-name]
# Cleans NPM cache, etc out. See https://github.com/heroku/heroku-repo
heroku repo:purge_cache -a [app-name]
# Link folder to existing app
heroku git:remote -a [app-name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment