Skip to content

Instantly share code, notes, and snippets.

@cball
Created April 20, 2012 18:22
Show Gist options
  • Save cball/2430852 to your computer and use it in GitHub Desktop.
Save cball/2430852 to your computer and use it in GitHub Desktop.
Adding new staging servers & multiple branch deploys on heroku
## add new staging server locally that someone else created ##
# make sure you're a collaborator on the app
heroku apps
# assuming you already have directory cloned, if not clone it.
git remote add app2 git@heroku.com:app2.git
# deploy master
git push app2
# deploy other branch
git push app2 branch:master
## Create a new staging server ##
# Create heroku app and the remote
heroku create app2 --stack cedar --remote app2
# create your branch (assuming we dont want to use master)
grb new app2
# push app2 branch to the new heroku app (git push REMOTE LOCAL_BRANCH:master)
git push app2 app2:master
# add any additional collaborators
heroku sharing:add dude@wee.net --app app2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment