- Save this file to
repo-path/.git/hookswith the nameprepare-commit-msg. - Make it executable using
chmod +x. - Ultimate win every time you use
git commit.
OR in repo directory...
curl https://gist.githubusercontent.com/alechill/499edbefb8d0142bae71/raw/a6d4b07edfc494c472e55b1e2fc190d1fc851876/prepare-commit-msg -o .git/hooks/prepare-commit-message && chmod +x .git/hooks/prepare-commit-message