Hacker News new | ask | show | jobs
by cimmanom 2653 days ago
Yes, a policy that every commit must reference an issue in the tracker is useful. It makes it possible to cross reference the history of the codebase with the discussions that occurred around it and the reasons for the changes in greater depth than a commit message could cover.

I find the one commit per issue policy too restrictive. It’s a terrible idea for larger projects and IMO unnecessary even for smallish fixes. But then, I’m also someone who strongly dislikes linear histories.

1 comments

I'm not willing to enforce one commit per issue, but one issue per commit. An issue may have, of course, multiple commits (by multiple people maybe) but I wouldn't allow any single commit without referring an issue.
I’ll sometimes let a commit reference multiple issues (no point in 3 commits to fix 3 typos on the same page of copy, for an extreme example). But yes, that’s a good practice.