top | item 38830991

(no title)

anordal | 2 years ago

I also want to slightly disagree, or rather state a minimum:

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.

discuss

order

mcluck|2 years ago

Totally disagree on

    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 fix

anordal|2 years ago

Do you totally disagree that this is the minimum? I'm only saying that the context is the minimum. I refuse to disagree with you about things I'm not saying.

quickthrower2|2 years ago

For that you have external bug tracking systems. Although I tend to have a short summary and mention the ticket number. Therefore the comment stands alone but also has that extra detail outside.

hmeh|2 years ago

There’s another way that feels totally unnatural at first, but puts the subject (the most important part) of the commit message first. It makes the commit about the change and the code, rather than the author. This is how we do it in all of our projects. I fought it at first, but I was wrong and it’s a lot better.

Example:

EntityStore build method records the specifier argument when given

Article about it: https://github.com/aaronjensen/software-development/blob/mas...