by anordal · 2y ago · 0 comments
The most important part of a commit message is the context.
Good enough commit log:
utils: Minor
drivers: Fix
assets: Update
docs: Typo
Hopeless commit log: Minor
Fix
Update
Typo
Context should answer the "what". Think of it as the one word you tell a new conversation participant to let them realize what you are talking about. drivers: Fix
Let's say your fix causes issues later. When I read the commit message, I want to understand what you were trying to fix so I don't accidentally re-introduce the problem when I fix your fixExplain the issue, and by all means mention the bug number, but you must explain the issue you are dealing with.
Point is bad commit messages are sometimes a symptom to a larger problem and as with this vendor it is often a process problem, not an individual developer problem. In my opinion, the main problem here is that management simply doesn't care she it doesn't empower leads and developers who should care.
> Although I tend to have a short summary and mention the ticket number.
So for example
XJ-8883 - Ensure DB connections are closed sooner in main poolExample:
EntityStore build method records the specifier argument when given
Article about it: https://github.com/aaronjensen/software-development/blob/mas...