Git & Multiple sites

151 Views Asked by At

What would be the best way to use one git repository to push changes to 2 different websites that share 90% of the same files & code, apart from the logo, a preprocessed CSS file, and configuration files.

I'm not entirely sure how git sibmodules work exactly but from what I've read, does each submodule live in its own directory? Would I have to do that for each directory I have from root?

1

There are 1 best solutions below

0
On

I would say that you have the 10% inside of a directory that you can link with a linux ln command, but that's usually good when it's just images and what not.

The other advanced option would be to include the 90% code as a submodule of your customized code. Then whenever you make an update to the core code, you do a git submodule update to pull in the latest code there, then do a commit push on each site individually.