My personal configuration files and scripts.
at master 426 B view raw
1#!/usr/bin/env bash 2 3# Fix up a commit by presenting an interactive search through Git history. 4 5set -e -o pipefail 6 7# The `|| true` here ensures that the pipeline will complete even if no commit 8# is selected. 9commit="$(git log --color=always --oneline | (fzf --ansi --track --no-sort || true) | cut -d ' ' -f 1)" 10if [[ -z "$commit" ]]; then 11 echo "No commit selected, exiting." 12 exit 13fi 14 15git commit --fixup="$commit" "$@"