What to do when I want specific dev version of Drupal module.

For example:

Geocoder dev version from Jan 07 2016 is broken. Latest working dev version was from Sept 01 2015.

How can I download previous dev version of Drupal module (Geocoder in my case)? Any method is welcome.

  • Why do you need to do it via Drush? Is it just a case or is it really important? – Eugene Jan 10 '16 at 7:22
  • @Eugene Any method welcome (I have updated my question). – Jasom Dotnet Jan 10 '16 at 7:26

For the easiest way to do it:

  1. Go into the repository
  2. Select a version there and click on it
  3. There will be hash of commit (example)

So, you know the hash of commit - just clone this module from repository and switch to required hash of commit.

How to clone module via git

How to checkout the specific commit


git clone --branch 7.x-1.x https://git.drupal.org/project/geocoder.git
cd geocoder
git checkout c994066d58bc7518bc9796c60d4d43f98ae477cd
  • Can you make your nice answer beautiful (more detailed)? I know how to git cca, so example git commands would be welcome. – Jasom Dotnet Jan 10 '16 at 7:37
  • What do I need to type into my shell? – Jasom Dotnet Jan 10 '16 at 7:52
  • 1
    Why not. Done. Please try it. – Eugene Jan 10 '16 at 8:38
  • I think you miss . (dot) in the end of git checkout c994066d58bc7518bc9796c60d4d43f98ae477cd . line – Jasom Dotnet Jan 11 '16 at 8:32
  • 1
    Mhhh really? I don't think that it's really need – Eugene Jan 11 '16 at 8:50

I want to add one more way how to download specific dev version of Drupal module:

“Drush make” method

Create make file for Drush (for example myMakeFile.make) and paste into it following:

api = 2
core = 7.x
projects[drupal][version] = 7.30
projects[geocoder][version] = "1.x-dev"
projects[geocoder][download][type] = "git"
projects[geocoder][download][url] = "https://git.drupal.org/project/geocoder.git"
projects[geocoder][download][revision] = "2ffd3fa8b22c11100516bf801bc08ba729cc8a68"

Type into shell:

mkdir removeMeWhenDone
mv myMakeFile.make removeMeWhenDone
cd removeMeWhenDone
drush make myMakeFile.make -y

Desired dev version of the Geocoder module is located in ~/removeMeWhenDone/sites/all/modules, now.

More details about Drush make method + how to get commit hash here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.