Created
November 3, 2014 14:43
-
-
Save clops/736268c470f7580c8cba to your computer and use it in GitHub Desktop.
GIT Hook to Prepend the ZEN card to the commit message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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