oliverdavies.uk/source/_daily_emails/2024-05-15.md

1.3 KiB

title date permalink tags cta snippet
Should you include issue IDs in your commit messages? 2024-05-15 daily/2024/05/15/should-you-include-issue-ids-in-your-commit-messages
software-development
git
~ Do you include issue or ticket IDs in your commit messages?

It's shown in the examples of the conventional commits specification as part of the optional footer data.

But is it useful?

It can be if your issue tracker is linked to your Git repository and you can click the issue ID in a commit message and see the issue.

But, how often do teams change issue-tracking software or the project is passed to a different company that uses a different issue tracker?

That makes the issue IDs that reference the old IDs useless as no one has access to the issues it references.

I'd recommend putting as much information in the commit message itself and not relying on it being in an external source, like an issue tracker.

The Git log and commit messages will remain even if a different issue tracker is used, or a different team starts working on the project, and that additional information isn't lost.

I'm not against putting the issue ID in the commit message but don't do it instead of writing a descriptive commit message.