Skip to content

Instantly share code, notes, and snippets.

Avatar

Ruskin jonnyparris

View GitHub Profile
@jonnyparris
jonnyparris / prepare-commit-msg.sh
Last active May 6, 2020 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with the Jira ticket reference from a branch name
View prepare-commit-msg.sh
#!/bin/bash
# For instance with feature/add_new_feature_HEYT-653
# $ git commit -m"Fixed bug"
# will result with commit "[HEYT-653] Fixed bug"
# Customize which branches should be skipped when prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
You can’t perform that action at this time.