4 ms·
Every commit message must start with JIRA ticket number
by webscalist 7y ago
Every commit message must start with JIRA ticket number
- sixstringtheory 7y agoI work at a place that used to prescribe this. I dislike it because it adds too much repetitive noise to the abridged git log. (It occurs to me that you may be making this point in a tongue-in-cheek way.) Originally I suggested we put the JIRA number/link in the commit body, but then I learned about git-notes to add metadata to commits and now I kinda want to do this with the semantic labels suggested by the thread OP, too (I currently use the schema suggested at https://seesparkbox.com/foundry/semantic_commit_messages https://seesparkbox.com/foundry/semantic_commit_messages).
- petepete 7y agoAnd I've used git nearly every day for more than a decade and written a git client, and this is the first time I've heard of notes. Thanks!
- masklinn 7y agoNotes kinda bloat the repository with additional objects, and they can be removed independent from the commits, so I'm a bit iffy on using them for this.
- sixstringtheory 7y agoGood points to consider, thanks! It’s good to know all the tradeoffs.
- gitgud 7y agoThis is a good way to; complicate development, slow down development and add an unnecessary dependency of jira...
- throwaway40324 7y agoThat sounds awful, but I/we do name feature branches as team-<TICKET #>(TICKET TITLE),with the title as usually optional
- carstenhag 7y agoWe do this, and I don't find it that bad: The branch is called feature/<Ticket ID>-<short-description> The commits contain usual commit messages. When merging, changes are quashed. The final commit message is similar to the branch name and includes the ticket and a short description, which is similar to the mentioned pattern (bump/add/change/whatever).
- masklinn 7y agoI find that awful, because now half your subject line is burned by completely useless information: the JIRA ticket number doesn't provide any useful information when reading a git log / summary.
- toastking 7y agoYeah and if you no long use JIRA it's not useful. Whatever bug tracking software you use should allow for commits to be attached to bugs. But that should stay in the bug tracking software, not the VCS.