#!/bin/sh src=$1 msg=$2 test -z $src && echo "source branch required." && exit 1 git merge --squash $src if test -n "$msg"; then git commit -a -m "$msg" && git branch -D $src fi