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