#!/usr/bin/env bash -e branch=$(git branchname) base="$1" shift git reset $(git merge-base $base $branch) git add -A git commit "$@"