Whenever a team starts working on a new Drupal-based website, there's an inevitable discussion on how to organize collaboration. Three questions come up regularly:
- How and when to use Features, Features Extra and Features Override modules
- How to organize production, testing and development environments and where to develop — on a shared server or locally
- How to share source code.
Out of the three, the question of the source code is the most contentious. One reason is that while everyone and their friends are already on git, most of the teams that implement Drupal websites do not really need a version control system where developers can cherry-pick and merge changes or analyze bugs by navigating commit histories. Instead, teams are usually interested in incremental backup systems where
each team member can be sure that he can roll back his own and other people's changes until everything works again.
Below is the inventory of ways to share source code in Drupal projects.
Incremental backup with drush
One way of ensuring incremental backups without the overhead of git or other version control system is to use drush. Drush keeps a backup of previous module versions in ~/drush-backups — there is enough info to revert manually to the previously known good state. This setup is ideal for small projects with a handful of custom modules that can be kept in their own git repositories.
When in doubt, don't put your Drupal project in git. Use drush and its build-in backup mechanism.