@lopin Difficult to distill into a single post, so here's a bunch of links which have been useful to for writing internal guidelines at work:
https://blog.jgc.org/2013/07/write-good-commit-messages.html
https://cbea.ms/git-commit/
https://jaywhy13.hashnode.dev/can-a-good-explanation-really-prevent-a-prod-incident
https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/commit-messages/
https://github.com/erlang/otp/wiki/writing-good-commit-messages
https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Maybe one day I'll write my own post collating all of this, but there’s a lot of good info in these.