Skip to content

Instantly share code, notes, and snippets.

@dcastro
Created March 13, 2014 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcastro/9526205 to your computer and use it in GitHub Desktop.
Save dcastro/9526205 to your computer and use it in GitHub Desktop.
Git hook - prefix commit message
PREFIX="SVC-41+2: "
ORIG_MSG_FILE="$1"
T="/tmp/git-temp-commit-msg"
(printf "%s" "$PREFIX"; cat "$ORIG_MSG_FILE") > "$T"
cat "$T" > "$ORIG_MSG_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment