Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # save file in .git/hooks/prepare-commit-msg
- BRANCH=$(git symbolic-ref --short HEAD)
- TICKET=`echo $BRANCH | grep -o 'MOB-\d\{1,\}'`
- status=$?
- if [ $status -eq 0 ] ; then
- echo "[$TICKET]\n$(cat $1)" > $1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement