3 ms·
I prefer issue/card numbers as it makes it easier to visually group and search for common commits of a single task in shortlog. feat/fix/chore have no functiona
by darylteo 4y ago
I prefer issue/card numbers as it makes it easier to visually group and search for common commits of a single task in shortlog. feat/fix/chore have no functional use in shortlog (for me!) and the mixed length moves the start of the actual comment and makes shortlog messy. That information can just as easily be put into the commit message. 2c.
This is probably more appropriate for private projects rather than public contributed projects perhaps where the benefit of conventional style is to be able to easily create changelogs of large number of commits.
- ulflander 4y agoWhy not both?
- darylteo 4y agoYour commit topic shrinks to only 40-45 characters if you try to do both (card numbers get quite large too if you're in a jira context, with their issue prefixes PROD-001 is 8 characters already) so you pick and choose. The other thing is that in an internal context, what does knowing whether it's a feature or a bugfix do for you? If it's such a big issue, then it'd be integrated into the issue prefix BUG-001 FEA-002 < less likely as each feature epic will probably have it's own code, so it'll be more XXXX-001 XXXX-002 Now you have a nice short log that aligns nicely, and you can figure out mostly where your merge points were anyway, so no need for merge commits, rebase works mostly fine. - BUG-001 fix for this thing - FEA-005 initial commit - FEA-005 unit tests - FEA-005 implement this thing - FEA-005 implement that thing - FEA-005 fixes for code review - BUG-002 fix for another thing - BUG-002 revert fix did not work - BUG-003 fix for that annoying thing Of course, just my 2c and my limited personal experience.
- stevula 4y agoConventional commits support a scope which can be an issue ID: `feat(37): add foo` The variable length is still a thing though.