Git branching for Agile workflows in Drupal 8

Matt Corks

Agile software development is a popular method used to enable adaptive planning and continuous improvement via flexible response to change. Typically, a product owner will describe a set of clearly defined user stories ("as a site visitor, I want to log in via Facebook so that I can comment on an article") and list them in order of priority. A scrum master will work with a team of developers to deliver these features during short 2-3 week sprints which are followed by a demonstration and review, after which the product owner will either declare the user story complete or ask for corrections. New user stories will be added, the backlog of pending user stories will be re-prioritized, the scrum master will choose a set of tickets which can be completed in the upcoming sprint, and the developers will start to work on the next round of improvements.

To make this work, it's best to use an issue tracker with a ticket for each user story, and to make all changes to your site on a separate git branch labelled with that ticket number. The changesets should be self-contained, and perform all necessary database changes in code via update hooks, features (Drupal 7), or the configuration management system (Drupal 8). Any further steps necessary to test or deploy the new version should be clearly described in the ticket description.

Once all your updates are in code, you're ready to use git to prepare for and manage your testing and deployment process. You'll need to adopt specific git practices to make this work smoothly.

Drupal is a registered trademark of Dries Buytaert.