Labs

By Alli Price | 18th April 2011

How to checkout Drupal 7 (or 6) via Git.

Since the migration from CVS to Git on Drupal.org, we've noticed that a few people are still having some trouble checking out a stable version of Drupal core, so, for those of you who aren't on the Acquia or Drush bandwagons, here you go! :)

git clone http://git.drupal.org/project/drupal.git target_directory

"target_directory" being the directory you wish to checkout to.

Once completed change to the target directory, then for Drupal 7.0:

git checkout -b local 7.0

Or if you'd like Drupal 6.20

git checkout -b local 6.20

That's it!

Comments

Nathan's picture
Nathan
Nathan

Thanks for the info. I'm getting the following error after running the first command:

$ git clone http://git.drupal.org/project/drupal.get "c:/Program Files/acquia-drupal/local/countercorp"

Cloning into c:/Program Files/acquia-drupal/local/countercorp...
fatal: http://git.drupal.org/project/drupal.get/info/refs not found: did you run
git update-server-info on the server?

dv-admin's picture
dv-admin
dv-admin

Hi,

Looks like you've mistype the repository URL, it should be "http://git.drupal.org/project/drupal.git" (you've got .get on the end) :)

Add new comment