tags:

views:

38

answers:

2

I'm working on a project that will be a base site for multiple other sites. Most of the core functionality will be the same so I don't want to maintain the same code all over the place and I'm wondering how best to do this.

Currently I have the "core" site in its own repo and then I just clone from that to make a new site. I can continue customizing and committing on the cloned repo just fine and even pull in updates from the core when I change it but it complains that the repos are out of sync.

Is this how most people do this and should I just ignore those messages?

A: 

This has been solved in many different ways, depending on the language and build systems. In java you have modularity provided by jars, taglibs and other mechanisms.
What language are you developing in, and how does it handle things like that?
If you're using straight html, and nothing else... good luck :)

Jim Barrows
It's Ruby but putting the project in a gem won't work. That's why I'm using Git.
kjs3
A: 

You could try to use git submodules (http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html). You'd have to still split up the code into different directories, but as long as ruby can integrate them correctly, you'll be fine.

Interleaving the files will be much more difficult, your best bet there would be to keep separate branches for each customization and merge from master into each site branch regularly.

Xentac