| ▲ | n8cpdx 11 hours ago | ||||||||||||||||||||||
It probably depends on the codebase, but I find the best motivation for writing solid commit messages is reading commit messages. Tools like gitlens make this really easy. Almost daily, I use commit messages and history as part of understanding why a decision was made, why a seemingly obvious alternative wasn’t chosen, etc. seeing the commit title on every line, and hovering to see the full message has become a core editor feature for me. It’s kind of like testing, the more I do it, the more I want to do it because the value is so consistently reinforced. There’s nothing like being able to track down exactly why a decision was made 6 years ago in a part of the code base you are struggling to understand written by someone who left before you joined the team. | |||||||||||||||||||||||
| ▲ | necrotic_comp 10 hours ago | parent [-] | ||||||||||||||||||||||
10,000% this. Attaching JIRA tickets, etc. to the commit helps for searching as well. I've worked with a number of people who do not believe in this and it drives me insane ; I try to enforce it, but there's a lot of messages like "fixed bug" that have zero context or detail associated with them. I don't understand why so many engineers are like this. | |||||||||||||||||||||||
| |||||||||||||||||||||||