Google Groups Home
Help | Sign in
Git - Managing multiple sites based around one codebase
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Kevin Ansfield  
View profile
 More options Jun 27, 7:20 am
From: Kevin Ansfield <kevin.ansfi...@gmail.com>
Date: Fri, 27 Jun 2008 04:20:24 -0700 (PDT)
Local: Fri, Jun 27 2008 7:20 am
Subject: Git - Managing multiple sites based around one codebase
Hi guys,

I'm starting to have some issues with the way I'm managing a couple of
sites based off of a single codebase. Each site has it's own theme,
deploy.rb and minor changes to the app.

At the moment I have each of these as a branch based off of master in
git but the master also has it's own deploy.rb to push to a demo site,
staging, etc. This is causing problems as every time I rebase the site
branches from master I end up with a huge string of conflicts
revolving around deploy.rb.

How do you guys handle a situation like this where you have multiple
instances of an app based off virtually the same codebase?

I see a couple of options:

1) Remove deploy.rb from master and have another seperate branch for
the demo site and staging.
2) Fork the main project for each site instance and forget about using
branches for each site

Does forking the project provide any benefits other than avoiding the
deploy.rb and possible view conflicts? Are there any better ways to
manage such a situation?

Thanks,
Kev


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Tucker  
View profile
 More options Jun 27, 8:16 am
From: James Tucker <jftuc...@gmail.com>
Date: Fri, 27 Jun 2008 13:16:19 +0100
Local: Fri, Jun 27 2008 8:16 am
Subject: Re: [BrightonRuby] Git - Managing multiple sites based around one codebase

On 27 Jun 2008, at 12:20, Kevin Ansfield wrote:

> Hi guys,

> I'm starting to have some issues with the way I'm managing a couple of
> sites based off of a single codebase. Each site has it's own theme,
> deploy.rb and minor changes to the app.

We avoid committing deployment configurations to the repository. You  
could also consider using hostname based configs, rake generated  
configs, and so on.

> At the moment I have each of these as a branch based off of master in
> git but the master also has it's own deploy.rb to push to a demo site,
> staging, etc. This is causing problems as every time I rebase the site
> branches from master I end up with a huge string of conflicts
> revolving around deploy.rb.

Branching is not entirely designed for this purpose, of course, it's  
the way rails guides you to work that will have led you to using  
branches for that. Can't you submodule out the app/views directory for  
each 'subproject', having a common repository for the underlying app  
logic?

> How do you guys handle a situation like this where you have multiple
> instances of an app based off virtually the same codebase?

In the past, badly, but really this is the old build script problem,  
and you want to think about your workflow, design something that fits,  
and commit to its conventions.

> I see a couple of options:

> 1) Remove deploy.rb from master and have another seperate branch for
> the demo site and staging.
> 2) Fork the main project for each site instance and forget about using
> branches for each site

> Does forking the project provide any benefits other than avoiding the
> deploy.rb and possible view conflicts? Are there any better ways to
> manage such a situation?

Forking? I presume you mean github? A fork is just a clone of a repo,  
and you merge as if it was a branch (only, the branch may be remote),  
so 'forking' won't strictly assist you in any way.

If the code base is split, then split the code base... I think the  
rails view paths may also be configurable, so have a poke around in  
the rails docs too. If not, they might be easy to patch for that.

HTH


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google