Skip to content

Instantly share code, notes, and snippets.

View albertosaurus's full-sized avatar

Arthur Shagall albertosaurus

  • Mindflight, Inc.
View GitHub Profile
@dulyanov
dulyanov / prepare-commit-msg
Last active October 2, 2015 04:37
Prepending branch name and task number before commit in GIT
#!/usr/bin/env ruby
#
# Git commit-msg hook. Prepend branch name to commit tasks.
# If your branch name is in the numeric form "12345", also prepend "(Task 123)" to commit messages,
# unless #notask is included in the message (#notask will be stripped).
#
# Based on git://gist.github.com/750755.git
#
# Place code into .git/hooks/prepare-commit-msg and give it executable permissions
# cd .git/hooks