git config --global init.templatedir '~/.git-templates' mkdir -p ~/.git-templates/hooks curl https://gist.githubusercontent.com/jonnyparris/0a10cc63af281de23a4fd34116fed3e6/raw/c65dec15a5470e8b68353b7e3f9a2a6f81ece562/prepare-commit-msg.sh > ~/.git-templates/hooks/prepare-commit-msg && chmod u+x ~/.git-templates/hooks/prepare-commit-msg
Use git init
to add it to pre-cloned repos.