[Cross posted from my Raincity Blog. In Vancouver and want to discuss this? Then come to to the Tweet Meat at Burrard and Pender at Japadog, Thu 12 March at noon.]

Git for Drupalers in 2 Minutes - 280 Slides

[See previous git blog post for more background on how this procedure isn't supported and other blah blah!]

In my never ending quest to make things simpler, I have distilled the process of using git with Acquia Drupal 6 (version 1.2.4 currently) down to 5 points:

  1. Install git and create your RSA SSH key
  2. cd /var/www/html
  3. git clone git@github.com:rtanglao/acquia-drupal-6.git
  4. edit settings.php, apache config, etc.
  5. install.php (i.e. install Drupal as normal!)

And it's even simpler for upgrading:

  1. On staging or dev server, backup your database and take site offline
  2. git pull
  3. update.php (i.e. upgrade Drupal following the normal Drupal installation process)
  4. repeat on live server

After the jump, more git and Drupal geekery and the way forward with git submodules (tutorial)

<p>I can hear the questions in your minds. Herewith a mini-faq!</p> <ol> <li>Q: How do I install git on my dev and live and staging servers? A: Can’t help you there since this varies from OS to OS and server to server. Google is your friend. We do plan on making git available on our Bryght Hosting products but unfortunately I can’t give you an ETA.</li> <li>Q: But what about Drupal 5? A: Sorry don’t have time for Drupal 5, this is a side project after all! However my previous git blog post should give you enough info to figure this out. </li> <li>Q: Why doesn’t Acquia do this? A: Don’t know. I am guessing they have other priorities and Acquia will come up with something that rocks harder eventually!</li> <li>Q: I love Drupal 6 and Acquia Drupal 6 but I need contrib modules that aren’t in your git repo. What do I do? A: Wait until I come up with a git submodule solution (a git repo where Acquia Drupal 6 is a sub repo, hopefully that will be the next blog post) or develop it yourself and let us know or fork the repo on github and I’ll find out through the magic of github.com!</li> <li>Q: Your repo s*cks! The CVS history from drupal.org is gone! How do I get it back? A: Use Mikl’s Git repo which is a mirror of the drupal.org CVS. Good luck! This is only for version control geeks and those who care about upcoming releases like Drupal 7 and require that version control history to be in git.</li> <li>Q: What happens with the next release of Drupal Acquia comes out i.e. post 1.2.4? How fast will you update your github.com Acquia Drupal repository? A: Again, no guarantees since this is a side project, but hopefully a week or less after Acquia updates and of course if you can’t wait, fork the repo, let us know and if it looks good, we’ll pull your commits from your forked repo.</li> <li>Q: You are a johnny-come-lately, surely others have done this right? A: Of course, yes I am a dilettante, who’s been working at a Drupal company since 2004 :-) Some interesting git and drupal links: Drupal installation profile for indy media sites in git, Maintaining/upgrading drupal installations with git (Chris Searle)</li> </ol>

Leave a comment on github