Skip to content

Instantly share code, notes, and snippets.

@xavarius
xavarius / prepare-commit-msg
Last active December 18, 2019 10:23 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# Script provides effortless way of prepending Jira ticket number
# into a commit message.
# It is compatible with "git flow" naming approach for branches :: f.ex feature/AVENGERS-667.
# Installation
# Put this file into rootProject/.git/hooks dir.
# Make it executable. (with chmod)