Published March 15, 2021
by Doug Klugh
Faster Debugging
Write meaningful messages on every code commit to make it easier to debug broken builds. Every commit message should explain the change or extension in summary and in detail. Facilitate traceability by including a link to the associated user story or defect within your ALM tool. Minimize merge conflicts by keeping your commits small and checking code in frequently. Keep the build healthy and fix broken builds fast.
The time will come when you’re facing a broken build and the person who wrote that code is not available (for one reason or another). And that’s when a detailed commit message will save you hours of debug time. Commit messages will also help you select the correct changeset if you need to roll back changes. Otherwise, you will spend a considerable amount of time looking through code to determine how far to rollback.
Commit messages should include a meaningful summary that serves as a headline for the changeset, along with detailed explanation of the change and why it was made. And with a link back to the user story, you can always find more information on that feature, along with traceability further back to the requirements (hopefully).
Keep the commits small and the commit messages will be easy to write. In the long run, they will save far more time than they take to write.