I have a Rails 3 app I’m developing with a team using Git/Github and deploying to a Heroku cedar stack. Our Github respository has 2 main branches Master and Development.
I would like to push our Development branch regularly to a different server on Heroku as a development/staging environment.
What’s the cleanest simplest way to push our Development branch to a different app than Master without disrupting our Git flow much?
Thanks a lot!
You’ll want to add a second git remote i.e. your second application’s heroku git repo url to your app to be able to push to that from a single codebase.
At the moment you probably have the default remote origin named ‘heroku’ which is pushing to your production application.
You’ll want to add a second remote origin pointing at your new heroku app that you intend to use for staging, eg
once you have the new git origin set up you can push to it via;