Skip to content

Instantly share code, notes, and snippets.

View phurtado's full-sized avatar

Pablo Hurtado phurtado

View GitHub Profile
@phurtado
phurtado / prepare-commit-msg.sh
Last active May 10, 2019 16:32 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="$(echo ${BRANCH_NAME##*/} | grep -oE '[A-Z]+-[0-9]+')"

Keybase proof

I hereby claim:

  • I am phurtado on github.
  • I am pani (https://keybase.io/pani) on keybase.
  • I have a public key whose fingerprint is 8DB9 7148 E22C D5C5 6A2D 64BA ED3A 814F 6D1F 42D0

To claim this, I am signing this object: