Skip to content

Instantly share code, notes, and snippets.

@alexey-detr
Created April 25, 2019 15:04
Show Gist options
  • Save alexey-detr/2860d1ca99f4cfcc4d86a294fac98ebd to your computer and use it in GitHub Desktop.
Save alexey-detr/2860d1ca99f4cfcc4d86a294fac98ebd to your computer and use it in GitHub Desktop.
Modify a commit message hook
#!/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