|
|
|
|
|
by crazygringo
509 days ago
|
|
I've never worked that way. In my mind, commit messages should be a quick summary of what. The basic motivation should be clearly labeled as a feature, bugfix, etc., but that's all. Commit messages are for quick browsing and a summary of what changed, not extensive justification. The why is too important to be put in a commit message. The product why belongs in a linked issue that describes the bug or use case in full detail. Meanwhile, the technical why's (why this particular solution as opposed to alternatives) belong in the code itself as comments. |
|
But the actual commit message should consist of History/Motivation/Context - so that someone who's going through the blame can understand why a certain change was made, and what the context was.
Linus had a good template for this, which makes a lot of sense: https://gist.github.com/finalfantasia/bd0070673ca27e5f7473