Created
April 25, 2019 15:04
-
-
Save alexey-detr/2860d1ca99f4cfcc4d86a294fac98ebd to your computer and use it in GitHub Desktop.
Modify a commit message hook
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
#!/usr/bin/env bash | |
BRANCH=`git branch | grep '^\*' | cut -b3-` | |
REFS=`echo "$BRANCH" | sed -E 's/^[^_]+_([0-9]+)_.+$/\1/'` | |
echo "Refs #$BRANCH - " > $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment