Created
August 5, 2014 08:29
-
-
Save haarts/85fc3a843b2274f807cc to your computer and use it in GitHub Desktop.
Prepend pivotal feature number to commit message
This file contains hidden or 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 | |
BRANCH_NAME=$(git symbolic-ref --short HEAD | sed "s/^feature_\([0-9]*\).*/\1/") | |
if [ -n "$BRANCH_NAME" ]; then | |
sed -i.bak -e "1s/^/[#$BRANCH_NAME] /" $1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment