Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeBrotha/703e7758714e706ad38bfce15e8a3512 to your computer and use it in GitHub Desktop.
Save CodeBrotha/703e7758714e706ad38bfce15e8a3512 to your computer and use it in GitHub Desktop.
Heroku Staging & Production Remotes Setup

List current remotes:

git remote -v

Add Heroku product & staging remotes:

Using Heroku-CLI:

heroku git:remote -a staging-app-name -r staging
heroku git:remote -a production-app-name -r production

Set staging as default for "heroku" command:

git config heroku.remote staging

If you need to rename your previously added "heroku" remote:

git remote rename heroku staging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment