Skip to content

Instantly share code, notes, and snippets.

@clops
Created November 3, 2014 14:43
Show Gist options
  • Save clops/736268c470f7580c8cba to your computer and use it in GitHub Desktop.
Save clops/736268c470f7580c8cba to your computer and use it in GitHub Desktop.
GIT Hook to Prepend the ZEN card to the commit message
#!/bin/sh
card=$(git symbolic-ref HEAD | awk -F- '/ZEN-/ {print $2}')
if [ -n "$card" ]; then
echo "ZEN-$card " | cat - $1 > /tmp/out && mv /tmp/out $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment