After a silly feeling with drush make and github I found out that all the .git folders (used by git to record history, config, origin location etc ) were removed by drush make and I have heard about this before but didn't come across myself as I was not maintaining the make files.

Specifically drush make removes the .git folder and u can see that if u run it with --debug option

Executing: rm -rf '/tmp/drush_make_tmp_1305733094/__git__/__build__/.git'

In my make file I am fetching 4 things from git repo because I wish to track development on them, 2 of them are my custom components ( 1 custom module and 1 feature which records all the config) and the other drupal core and media module due to high volume of fixes they receive. The whole purpose seems defeated if I can't have respective .git folders but I am also sure there is a way as others are using drush make with git but couldn't find in my quick search.

Thanks for your time!

3 Answers 3


Pass the "--working-copy" switch to Drush Make.

drush make --working-copy site.make
  • 5
    If you'd like per-project control over this, you can add to the make file: projects[project_name][options][working-copy] = TRUE
    – Andy
    Commented Oct 23, 2013 at 12:18

And if you're using YAML for your make file, the following will allow you to preserve the .git repository info:


    type: core
    version: 8.0.x
      working-copy: true

And further, if you don't want drush to add in extra information to projects' .info files, make sure you use the --no-gitinfofile option when running drush make.


On project by project basis, in a make file you can add the option like this

projects[project_name][download][type] = git
projects[project_name][download][url] = ssh://[email protected]
projects[project_name][options][working-copy] = TRUE
  • This is not correct; Andy's comment above actually works. You have to use the options array, not the download array, to fetch the working copy. Commented Jun 9, 2016 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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