#!/sbin/bash # git-squash - A simple script to do git squashing set -e branch="$1" shift git merge --squash "$branch" git commit "$@" git branch -D "$branch" git push origin --delete "$branch"