#!/bin/bash -e # Retrofit changes onto an old commit during the next rebase/rewrite, # adding an additional comment `git squash COMMITISH` (for example, # `git squash HEAD`). COMMIT=HEAD if [ $# -gt 0 ]; then COMMIT="$1" shift fi exec git commit --squash "${COMMIT}" "$@"