threads / discuss / 21639

git multisite setup

Subject: git multisite setup

## tl;dr

4 messages between Nov 16, 2009 and Nov 17, 2009.

replies: 3people: 2as markdown or json

Matt Di Pasquale· Nov 16, 2009, 18:18 UTC · lore

Hi, In my sites folder i have folders for different sites of mine: example.com example2.com, and i also have generic files like an includes dir and a .htaccess file that all sites use. what is the best way to track the generic files and the different sites?

i was thinking each site has its own .git repo. and then make a .git repo for my sites folder but ignore the individual sites dirs. actually that's what i'm doing now.

should i use submodules? i don't really understand submodules and the examples i saw did not cover nested folders

Thanks!
matt
Nicolas Sebrecht· Nov 17, 2009, 00:13 UTC · re: Matt Di Pasquale · lore

Re: git multisite setup

The 16/11/09, Matt Di Pasquale wrote:
Show 8 quoted lines
> In my sites folder i have folders for different sites of mine:
> example.com example2.com, and i also have generic files like an
> includes dir and a .htaccess file that all sites use. what is the best
> way to track the generic files and the different sites?
> 
> i was thinking each site has its own .git repo. and then make a .git
> repo for my sites folder but ignore the individual sites dirs.
> actually that's what i'm doing now.
This looks good to me. Why would you like to change?
-- 
Nicolas Sebrecht
Matt Di Pasquale· Nov 17, 2009, 00:17 UTC · re: Nicolas Sebrecht · lore

Re: git multisite setup

yeah. i guess it's fine. :) just that the specific git repos aren't coordinated to the generic one. but that's fine so far since i haven't had to jump around to different commits and the generic has stayed pretty much the same.

On Mon, Nov 16, 2009 at 7:13 PM, Nicolas Sebrecht <nicolas.s.dev@gmx.fr> wrote:
Show 16 quoted lines
> The 16/11/09, Matt Di Pasquale wrote:
>
>> In my sites folder i have folders for different sites of mine:
>> example.com example2.com, and i also have generic files like an
>> includes dir and a .htaccess file that all sites use. what is the best
>> way to track the generic files and the different sites?
>>
>> i was thinking each site has its own .git repo. and then make a .git
>> repo for my sites folder but ignore the individual sites dirs.
>> actually that's what i'm doing now.
>
> This looks good to me. Why would you like to change?
>
> --
> Nicolas Sebrecht
>
Nicolas Sebrecht· Nov 17, 2009, 00:50 UTC · re: Matt Di Pasquale · lore

Re: git multisite setup

[ Please, don't top-post nor whole quote. ]
The 16/11/09, Matt Di Pasquale wrote:
>                                       the specific git repos aren't
> coordinated to the generic one. but that's fine so far since i haven't
> had to jump around to different commits and the generic has stayed
> pretty much the same.

I'm not sure to understand exactly what kind of coordination you expect exactly (because you don't describe what you'd like that much), but submodule could be what you need, yes.

FMHO, the best way to check if you need it is to try it. For a good start, I guess you'll need to change your approach on "what depends of what". I think you should consider the _common_ part to be the _dependency_; as a consequence, it should be the submodule used in the other repositories. AFAIR, submodule was originaly designed to make our life easier with libraries. It may fit to your needs too but again, the best thing to do is to try.

-- 
Nicolas Sebrecht

← back to recent threads