git

19 May

Updated Instructions for Installing Drupal Vagrant on Windows 7

in drupal, git, multi-site, vagrant, virtualbox

VirtualBox, Vagrant, Ruby, and Git have all gone through upgrades (major and minor) since I wrote the chapter on installing them in Multi-Site Drupal. While this hasn't made much of a difference for Mac and Linux/UNIX, Windows 7 support is now much better.

Here is a guide for installing the Multi-Site vagrant image for Drupal 7 on Windows 7. (If you're interested in running Drupal Vagrant, these instructions will work for that project as well.)

10 Jan

Git drupal:// URLs for projects and sandboxes

in drupal, git

In a previous post, I showed an example of cloning a module that included this command: git clone drupal://drupalcs. But I neglected to explain how this worked. I'm not sure where I picked this up (it was probably from Sam Boyer), but by adding a few lines to your ~/.gitconfig makes checking out Drupal projects and sandboxes easier:

[url "ssh://git@git.drupal.org/project/"]
    insteadOf = "drupal:"
[url "ssh://git@git.drupal.org/sandbox/"]
    insteadOf = "drupalsand:"

This allows you to use drupal://PROJECT_NAME to identify a project (module, theme) git repository, and drupalsand://USER/NID to checkout a sandbox. For example, I can clone one of my sandbox projects with this command, executed at the command line:

$ git clone drupalsand://mbutcher/1356522
Cloning into 1356522...
remote: Counting objects: 988, done.
remote: Compressing objects: 100% (466/466), done.
remote: Total 988 (delta 463), reused 878 (delta 404)
Receiving objects: 100% (988/988), 242.04 KiB | 354 KiB/s, done.
Resolving deltas: 100% (463/463), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.

Perhaps this sort of syntactic sugar isn't for everyone, but I find it to be a nice configuration short-cut.

04 Dec

Git Cherry Picking: Move small code patches across branches

in git

I just performed my first 'git cherry-pick'. And it was great. A cherry-pick, in Git parlance, is an operation which moves a specific glob of changed code from one branch of the VCS to another. Not sure what that means? Read on for an explanation and an example.

21 Nov

PHP Developer's Snow Leopard Upgrade Notes

in git, os x, phing, php, phpdocumentor, programming, snow leopard, xdebug

I'm upgrading to Snow Leopard, and I intend to switch from MAMP to the built-in PHP/Apache 2 configuration. As a PHP developer, there are several notable things that I wanted to track as I performed my upgrades. This article tracks those changes

PHP 5.3PHP 5.3
My current OS 10.5 toolchain for PHP was this:

  • PHP 5.2.6 (MAMP)
  • Apache 2 (MAMP)
  • MySQL 5 (MAMP)
  • TextMate
  • Git
  • XDebug
  • Several PEAR packages installed into MAMP's PHP 5, including PHPUnit, PhpDocumentor, Phing, and XDebug

One of the desired outcomes was to switch to the OS X version of PHP and Apache, which is tenable now that PHP is more robust (and now that I know how to use PEAR with the OS X version). It's also desirable because Snow Leopard is now running PHP 5.3. Here are my notes on the upgrade.

Update: Problems with PHPUnit and Phing.