This script fast forward merges a branch and then deletes the old one. I normally run it like this:
git m master feature
#!/bin/bash -x set -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; fi git 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.