Get commit message in Git hook
In the pre-commit hook, the commit message usually hasn’t been created yet 1. You probably want to use one of the prepare-commit-msg or commit-msg hooks instead. There’s a nice section in Pro Git on the order in which these hooks are run, and what you typically might do with them. 1. The exception is that … Read more