This script fast forward merges a branch and then deletes the old one.  I normally run it like this:git m master featureHere's a link to the gist.#!/bin/bash -xset -e#by naming this git-m and putting it in your PATH, git will be able to run it when you type git m ...if [ $# -ne 2 ]then  echo Wrong number of arguments. Should be 2, was $#;  exit 1;figit checkout $1;git merge --ff-only $2;git branch -d $2;Is there anything wrong with this?  My biggest fear is I could run this script with a typo and end up deleting a branch without merging first.
Git script that fast forward merges and deletes the old branch
bash;git
Two minor notes:You can restore a deleted branches with the reflog (although reflog entries can expire).I would check at the beginning whether the feature ($2) branch exists or not. In the latter case do not checkout the master ($1) branch nor modify the state of the working copy, just print an error message.