4 ms·
From my experience, commit messages are not actively read by someone, but searched for. Instead of writing a summary of my commit into the commit message subje
by w4rh4wk5 4y ago
From my experience, commit messages are not actively read by someone, but searched for.
Instead of writing a summary of my commit into the commit message subject, I try to use related keywords, tags, and references.
Usually it starts with a section prefix indicating what part of the code is touched. "UI:" is a common example.
After a short sentence containing the most important keywords, I add bug tracker IDs to issues related to my commit.
The goal for me is to find a previous change as quickly as possible when something related occurs in the form of a bug or a feature.
- WorldMaker 4y agoIn my view, commit messages are a type of documentation that is often underappreciated. It's the type of documentation you don't miss until those moments when you desperately need it. It's also a part of the storytelling of a good PR. I don't force anyone to go back and rename commits or anything (and I don't squash either; I'm happy with --first-parent and other tools), but it's a lot faster and nicer sometimes to review a PR commit-by-commit from someone who put the time into telling a useful story in their commit documentation.