Skip to content

Instantly share code, notes, and snippets.

@zikofv
zikofv / prepare-commit-msg.sh
Last active February 19, 2018 15:45 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# $1 is the commit message
# 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 stage)
fi