Created
February 9, 2010 14:35
-
-
Save zorab47/299242 to your computer and use it in GitHub Desktop.
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
# Add the following lines to .git/hooks/prepare-commit-msg and | |
# ensure it is executable. | |
# Prefix the message with the branch's name e.g. "#STORY-23: " | |
# The reason the branch line is commented is to prevent accidental | |
# commits. | |
BRANCH=`git branch | grep '^*' | sed -e 's/^\* //'` | |
MESSAGE=`cat "$1"` | |
echo "#$BRANCH: $MESSAGE" > "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment