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
sitesdirectory under version control. - Keep the entire
drupaldirectory 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:
contribmodules downloaded fromdrupal.orgcustommodules just for this site, not intended for release ondrupal.orgfeaturesfor 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.)