logoalt Hacker News

fweimeryesterday at 7:35 PM2 repliesview on HN

The commit message should complement the code. Ideally, what the code does should not need a separate description, but of course there can be exceptions. Usually, it's more interesting to capture in the commit message what is not in the code: the reason why this approach was chosen and not some other obvious one. Or describe what is missing, and why it isn't needed.


Replies

somatyesterday at 8:01 PM

It sounds like if you are vibe-coding, that is, can't even be arsed to write a simple commit message, your commit message should be your prompt.

ImPostingOnHNyesterday at 7:41 PM

That sounds like design discussions best had in the issue/ticket itself, before you even start writing code. Then the commit message references the ticket and has a brief summary of the changes.

Writing and reading paragraphs of design discussion in a commit message is not something that seems common.

show 3 replies