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:
insteadOf = "drupal:"
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.