Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lionel-rowe
lionel-rowe / prepare-commit-msg.sh
Last active June 17, 2019 08:57 — 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.
# curl <link_to_raw> > .git/hooks/prepare-commit-msg && chmod u+x .git/hooks/prepare-commit-msg
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi