There was a recent blog post about this, along the same lines as Mat's
suggestion:
http://jqr.github.com/2009/04/25/deploying-multiple-environments-on-heroku.html

On Tue, Apr 28, 2009 at 2:30 PM, Mat Schaffer <mat.schaf...@gmail.com>wrote:

>
> On Apr 28, 2009, at 1:50 PM, teejayvanslyke wrote:
> > Is anyone else using Heroku for two environments running different
> > branches of the same repository on each?  What is your solution?
>
> I'm not doing this, but from my knowledge of git it should be totally
> doable. You'd have two heroku apps, for the sake of discussion call
> them "myprodapp" and "mystagingapp".
>
> You'd add both of these as remotes to your git repo:
> git remote add prod g...@heroku.com:myprodapp.git
> git remote add staging g...@heroku.com:mystagingapp.git
>
> Then when you want to push to prod from master do:
> git checkout master
> git push prod master
>
> When you want to push to staging do:
> git checkout edge
> git push staging master
>
> Git push can also take a source branch so the checkout isn't even
> necessary really. You should be able to do:
> git push g...@heroku.com:myprodapp.git master:master
> git push g...@heroku.com:mystagingapp.git edge:master
>
> I could be a little off, but that's the basic idea. Check out 'git
> push --help' for more details. Also http://grb.rubyforge.org is
> helpful for dealing with remote branches.
>
> -Mat
>
> >
>


-- 
Dan Croak
http://thoughtbot.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to heroku@googlegroups.com
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to