A summary of what the change does is still useful, and I'm glad this can now be automated, but it's not the main benefit of a well written commit message.
There is a great blog post about it: https://dev.to/jacobherrington/how-to-write-useful-commit-me...
It boils down to the following commit message template:
<what you changed>
because <why it was needed>Out of three (commits, comments, docs), the commits are least approachable, just few changes in the code will erase original commit in the blame.
By all means write good commit messages, but crystallize the info in them into changelog or other docs every bigger release
Starting point. After that it should up to the committer to make modifications and upstream the message. For those cases, seems good enough for me.
The “why” goes into the PR and more importantly, engineering documentation and inline comments.
Plus, a commit message seems woefully plain and too short to properly communicate these things.
The beauty is that this isn’t prescribed. We can all do what makes sense for our contexts.
This just ensures that the “why” is lost when someone comes looking years later.
From experience, SCM history is far more durable than just about any other work product we produce.
Over five decades later, commit history was still available for the Unix sources and could be reconstructed: https://github.com/dspinellis/unix-history-repo
I’ve used 35-year-old commit messages to help understand a long-standing issue, decades after all other related organization tooling and data had disappeared.
What you're asking for would result in extremely bloated messages.
This kind of stupid.
1. At best, all this can do is look at what you actually committed, but that's not going to tell you the most useful stuff that should be included in a commit message, like why you're making the change in the first place and what your intent was (which may deviate from what you actually did).
2. If you wrote the damn commits, you should be able to describe them yourself. If you can't, something's wrong.
The only case where I can see a tool like this being useful, instead of a bad habit, is summarizing old commits, where the committer didn't put anything useful in the commit message.
It can't work, unless it's hooked up to a brain scanner and can read your thoughts.
It seems more like dumb thing that people who don't know what they're doing will think is smart.
Communication is part of the job. How many well-paid and creative professions get to just "nope" out if their responsibilities like that?
Also if an engineer has troubles describe change than maybe you don't want that change to end up in you repo.
My experience with this hitherto relates to terrible scaffolded/generated code. I’m scratching my head wondering “why did s/he do it this way?” only to realize the nonsense code was lazily churned out by some generator. I wish this stuff was labeled clearly.
Like, in this case, I would guess that the vast majority of commit messages are something like "foo", "fixed", "argh", "stupid CI thing try 10", etc. Pretty sure GPT can improve on those.
`npx add-gpt-summarizer@latest`
The CLI will walk you through all the setup steps. source code: https://github.com/soof-golan/add-gpt-summarizer
Writing good commit messages is thinking, not toil. 90% of the time is even easy, one line description, good to go. The other 10% is when you gotta do the thinking, though. Extracting the relevant changes from the incidental ones, summarizing the whys, the pros and cons, the weird interactions that lead to the specific choices made in the code. This is not toil, it's thinking. It's not even a matter of whether AI can do it well (for this 10%, I'm *very* skeptical it can), the issue is that this is the kind of thinking you should *want* to do, that you should want to get better at.
TL;DR: this feels like asking the computer to jog for you and expect to loose weight.