1. Tim Pettersen
  2. prepare-commit-msg-auto

Overview

HTTPS SSH

Auto prepare-commit-msg hook

This prepare-commit-msg hook will automatically generate a commit message based on the files that you have changed. This is definitely not a good practice for software projects! But I use git locally to version all sorts of non-code things, which - especially when coupled with a horrible compulsion to commit in microscopic increments (just like I quicksave every 3 seconds in first person shooters) - means a lot of wasted time making up short pithy commit messages.

Installation

From the root of your git repository, run the following:

curl -so .git/hooks/prepare-commit-msg https://bitbucket.org/tpettersen/prepare-commit-msg-auto/raw/master/prepare-commit-msg
chmod a+x .git/hooks/prepare-commit-msg

And that's it! Next time you commit, your message will be pre-populated with some redundant info about what changed. In future I might build some more smarts into it for specific types of non-code projects, but this scratches my immediate itch.