Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Add this to .git/hooks/prepare-commit-msg
- # Prepends the current branch name to the git commit message
- TMPFILE=`mktemp /tmp/git-commit-msg.XXXXX`
- BRANCH=`git rev-parse --abbrev-ref HEAD`
- echo -n "$BRANCH " > $TMPFILE
- cat $1 >> $TMPFILE
- cat $TMPFILE > $1
- rm $TMPFILE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement