3 ms·
I don't really agree with this approach, you should use either tags or branch names to link issues with git, commit titles are not the right place. It's very co
by Etheryte 8y ago
I don't really agree with this approach, you should use either tags or branch names to link issues with git, commit titles are not the right place. It's very common for an issue to span multiple commits, this solution feels insufficient. If you feel it's necessary, you can add the issue number to the commit message body, but as a title it's not that useful. Humanly readable titles are the best option, if I need to find something I will be using git log or grep anyway.
- chrisweekly 8y agoI respectfully disagree. Regardless of branching model, why not use commit titles like: `{Jira-1234} ADD flux capacitor control module` ... and put more verbose details in the commit message body if/when needed?
- pythonaut_16 8y agoI think the opposite tends to be more helpful. The title should give you as much information as possible at a glance since it's likely to be seen in a list of commits or as part of the history of a file or line of code. The more verbose details and ticket id should be in the body since I'm more likely to care about them once I've pulled up the commit to review in detail.
- chrisweekly 8y agoNot to belabor the point, but once you're familiar with the contents of a given ticket (the "{Jira-1234}" reference in my example), the commit message titles' information density goes way, way up. Adding this ~12-character prefix results in useful, scannable, one-line commit messages. I see no downside.