Commit messages are really helpful, but not always top of mind while you're actually working on something. I'm pretty sure I've got a fair number of commit messages titled along the lines of, “ashdfkafwaieu argh just work already!”
Helen Housandí has updated the WordPress Core Handbook (which is a great resource all around!) to showcase how to write good commit messages. Granted, only a small number of people have commit privileges for WordPress itself, but this is useful to anyone writing code.
The whole doc is valuable, but at a bare minimum check out the differences between three messages from bad to good:
Don’t use strict comparisons for term IDs. props booneiscool. fixes #3398.
Fixing `wp_dropdown_categories()` and other places that use term IDs.
props boonerocks. fixes #20000.
Taxonomy: Relax term ID comparisons.
Term IDs are sometimes provided as strings. This is particularly evident in `wp_dropdown_categories()`, where the `selected` argument was not being respected. Plugin authors should also be wary of using strict comparisons for term IDs.
Most commit messages follow a similar pattern. And I know this encourages me to make better commit messages. Check out the whole guide, and while you're at it peruse the Core Handbook in general, you might learn a few things!