cfg/bin/git-fixup-last

10 lines
250 B
Text
Raw Permalink Normal View History

#!/bin/bash
set -euo pipefail
source ${HOME}/bin/script_framework.sh
commit=$(git log master..HEAD --oneline | grep -v 'fixup!' | head -n1)
step "Doing fixup against commit: ${commit}"
exec git c --fixup $(echo "${commit}" | cut -d ' ' -f 1) "$@"