# git multisite setup

4 messages from 2009-11-16 to 2009-11-17. Participants: Matt Di Pasquale, Nicolas Sebrecht.
Thread: https://gitlist.dev/t/21639

## Matt Di Pasquale, 2009-11-16 18:18

Subject: git multisite setup
Message-ID: <13f0168a0911161018r6fc67d29n781cca670a66815b@mail.gmail.com>
URL: https://gitlist.dev/e/13f0168a0911161018r6fc67d29n781cca670a66815b%40mail.gmail.com

```
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, 2009-11-17 00:13

Subject: Re: git multisite setup
Message-ID: <20091117001320.GA13074@vidovic>
URL: https://gitlist.dev/e/20091117001320.GA13074%40vidovic
In-Reply-To: <13f0168a0911161018r6fc67d29n781cca670a66815b@mail.gmail.com>

```
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

```

## Matt Di Pasquale, 2009-11-17 00:17

Subject: Re: git multisite setup
Message-ID: <13f0168a0911161617o56757488n45328714fb1d3bea@mail.gmail.com>
URL: https://gitlist.dev/e/13f0168a0911161617o56757488n45328714fb1d3bea%40mail.gmail.com
In-Reply-To: <20091117001320.GA13074@vidovic>

```
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:
> 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, 2009-11-17 00:50

Subject: Re: git multisite setup
Message-ID: <20091117005005.GC13074@vidovic>
URL: https://gitlist.dev/e/20091117005005.GC13074%40vidovic
In-Reply-To: <13f0168a0911161617o56757488n45328714fb1d3bea@mail.gmail.com>

```
[ 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

```
