When I went over your configuration I discovered: no-commit-to-branch, which does somewhat the same as the last one in my list, so I will be change to be using that instead.
Anyway I noted that your example output, somewhat broke due to the ' (apostrophe). I do not see this as a serious issue, but in case you did not know you can overwrite the text output and avoid the single apostrophe in: "Don't commit to branch", which is the text emitted default by the hook.
Hi Kyle,
Great article, I only just recently discovered pre-commit myself and did a short write up myself.
I am working on my own pre-commit hooks, currently only having two:
spellcheck
prohibit-commit-main
When I went over your configuration I discovered:
no-commit-to-branch
, which does somewhat the same as the last one in my list, so I will be change to be using that instead.Anyway I noted that your example output, somewhat broke due to the
'
(apostrophe). I do not see this as a serious issue, but in case you did not know you can overwrite the text output and avoid the single apostrophe in: "Don't commit to branch", which is the text emitted default by the hook.And it will output:
Thanks for the article, I learn something new and expanded my toolbox.