Use Git and git-flow to manage code.
If we're working across multiple major Drupal versions, prefix the branch with d7-
, d8-
etc.
Two options:
- Keep the
sites
directory under version control. - Keep the entire
drupal
directory under version control; this gives us an extra bit of protection in the unlikely event that an update to Drupal core breaks our site.
Organise the sites/(all|whatever)/modules
directory into:
contrib
modules downloaded fromdrupal.org
custom
modules just for this site, not intended for release ondrupal.org
features
for site configuration managed using the Features module
If we're modifying a contrib
module and might want to contribute our changes back to the community, consider adding it as a git submodule. (See the drupal.org
handbook on Git.)