你刚刷到这条消息,本来准备顺手划走,但又怕自己错过了真正会影响下一步判断的那一点。

最容易做错的,是你喜欢注释丰富, Commit Message 详尽,还是反之?;代价往往是如果只盯表面热闹,你很容易在错误方向上花掉时间、预算和注意力。;我先给一个保守判断:长注释常替坏设计还债,长 Commit 才保存决策。。

My take: long comments often pay off bad design debt. Long commit messages preserve decisions. A comment that translates an obvious loop or condition is often compensating for weak naming, muddy abstraction, or a boundary that should have been cleaner in the code itself.

What keeps helping three months later is usually not the comment beside the line. It is the reasoning in the commit body: why this change exists, what was rejected, and where the edge of the decision is.

That is also where the evidence points. Git's patch guide treats the log message as being as important as the code because future maintainers need the why. Google's C++ style guide pushes back on comments that simply narrate what the code already says.

This is not "stop writing comments." Contracts, failure modes, and non-obvious edge cases still deserve them. The bad version is the line-by-line translation comment. A technical update is worth your time not because it lists more features, but because it changes your next decision.

If your team fixes one habit this week, raise the bar for commit bodies before asking for more comments. Share this with the teammate who still treats comment volume as a quality metric. Rich comments, detailed commit messages, or the reverse?

你喜欢注释丰富, Commit Message 详尽,还是反之?