#!/bin/sh -e # git prepare [msg...] - prepare Git commit message PREPARE=$(git rev-parse --git-dir)/.prepare if [ "$#" -eq 0 ]; then exec ${EDITOR:-vi} '+$' "$PREPARE" elif [ "$1" = -l ]; then git -p column <"$PREPARE" else printf '%s\n\n' "$@" >>"$PREPARE" fi