[support] Using Git for Site Building

sebastian inforazor at gmail.com
Tue Oct 25 11:16:34 UTC 2011


Hi there DTH,

Personally I use drush to pull and update releases [as it does 
everything for you, including update.php and clear cache and backup old 
files] and then I use GIT or Mercurial for my actual project SVC as this 
then lets me track and roll back/fwd to different releases of my 
particular website.

If I want to update modules, I just do it locally on my laptop, commit 
the code, check everything out to make sure it is still working, update 
a test.env if client needs to approve and then change the production to 
point to the latest code with just two commands [HG pull followed by HG 
update] and voila, beautiful, elegant and streamlined with lots of 
fall-back and redundancy.

Granted I just threw you a curve ball cause you were not asking about 
this and you want to use GIT to pull Drupal code instead of using Drush 
and I'm saying to use GIT or HG [or whatever] for your actual project 
instead of for Drupal...

So feel free to ignore me!
:-)

S.

On 2011-10-25 4:38 AM, DTH wrote:
> So I want to create a new D7 site and I've read http://drupal.org/node/803746
>
> I think I get it. So basically I'm creating a branch for pure Drupal
> core which I can pull to whenever I want to update Drupal. Say I only
> want to work from official releases (current 7.8). I checkout the 7.8
> tag. Branch that to "mysite" etc. Then I add all my contrib modules
> and custom modules to the "mysite" branch. Then when 7.9 is released,
> I pull again from Drupal.org, checkout the 7.9 tag(?) and then merge
> that with "mysite"?
>
> However, (in part, as 7.8 is a way behind head), isn't my Git timeline
> cluttered with things that are fairly irrelevant to me? I can see that
> using Git makes it much easier to get the latest version (rather than
> download zip, unzip, delete, copy etc), but it makes it harder for me
> to see my (irregular) changes to my custom modules and htaccess etc
> when they're mixed in with dozens of changes to core? Especially as
> lots of those changes are already ahead of where I start building my
> site?
>
> Also, if I'm going this route: should I have contrib be handled by Git
> as well? So I can pull the latest version of Views or Domain Access?
> If I do that, does the whole thing end up a mess with 40 remote
> repositories etc?
>
> Are there any other suggestions/alternatives/tips for someone who
> wants to build a site and use Git mainly to keep track of their own
> changes? Can I make Drupal a submodule? (I'm still not super sure how
> there work mind)


More information about the support mailing list