Skip to content

Instantly share code, notes, and snippets.

View fuinyroot's full-sized avatar

Fuiny Root fuinyroot

  • Fuiny Technology
  • San Bruno, California, USA
View GitHub Profile
@aczietlow
aczietlow / prepare-commit-msg
Last active June 6, 2024 10:11
Git hook for prepare commit msg. Looks for an issue number in the branch name (a number between 3-9 digits long) and prepends it to the commit message.
#!/bin/sh
#
# A hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg" and