tj.git-extras/bin/git-squash
2012-02-04 13:59:07 -08:00

13 lines
184 B
Bash
Executable file

#!/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