Created
July 18, 2012 20:10
-
-
Save stuartf/3138557 to your computer and use it in GitHub Desktop.
Branch name in commit msg
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
BRANCHNAME=$(basename $(git rev-parse --symbolic-full-name HEAD)) | |
if grep -qi '^SAKIII' << EOF | |
$BRANCHNAME | |
EOF | |
then | |
sed -i "1i\ | |
$BRANCHNAME" $1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment