Skip to content

Instantly share code, notes, and snippets.

View Git branching for Agile workflows in Drupal.md

Git branching for Agile workflows in Drupal

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 reprioritized, 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. Much has been written on the theory and practice of Agile, including books, online articles, and formal trainings. What I

@mvc1095
mvc1095 / prepare-commit-msg.sh
Last active Mar 2, 2017 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
View prepare-commit-msg.sh
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master dev test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@mvc1095
mvc1095 / field_config_update.php
Created Dec 24, 2015
Drupal 7: Update existing field_config.data
View field_config_update.php
<?php
// remove field settings for entity_translation & i18n_taxonomy after these
// modules are disabled. can be run via drush scr or hook_update_N().
// features can't remove existing field settings, or add or change them, so this has to be done manually
// https://www.drupal.org/node/1999652
// https://www.drupal.org/node/937554
$query = db_select('field_config', 'fc')
->fields('fc', array('id', 'field_name', 'data'))
->orderBy('fc.id');