5 ms·
"Link to issue for context" Just no... Why would you decouple the change from its context? Just add all the relevant information to the commit message itself,
by vsviridov 4y ago
"Link to issue for context"
Just no...
Why would you decouple the change from its context? Just add all the relevant information to the commit message itself, so it's preserved.
I follow my friend's approach which works really well.
https://yrashk.medium.com/solving-problems-one-commit-at-a-time-f0c56bbda7a0 https://yrashk.medium.com/solving-problems-one-commit-at-a-t...
Too many a times I had to do code archeology to encounter archived Jira or some old space I don't have permissions for, that was originally migrated from GitHub issues and all the ticket numbers are in complete mismatch.
- simonw 4y agoYou can't put screenshots in a commit message. You also can't update a commit message after you've pushed it. Agreed though that you shouldn't work like this if you can't trust your organization to reliably archive your issue threads!
- Salgat 4y agoBoth Github and Bitbucket support all of that in the PR, so if necessary, update your PR with additional comments/information. When I'm looking at a change, I always go back to the PR anyways since it provides discussion relevant to the change.
- simonw 4y agoYeah I sometimes use a PR in place of an issue thread for this kind of thing, because PRs support the exact same comment system that I find so valuable in issues.
- Izkata 4y ago> You can't put screenshots in a commit message. Now I'm wondering how big a git commit message can be and if a base64-encoded image would fit... > You also can't update a commit message after you've pushed it. Check out "git notes", it lets you add more to a commit message without changing the hash. No idea how it interacts with things like gitlab/hub.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- sjansen 4y ago> Why would you decouple the change from its context? The issue is the context. At work, we require a link to the issue/story because it makes SOC2 audits much easier. The commit message is a great place to explain the chosen implementation, but that's not all there is to software development. It rarely makes sense to repeat in commits how the issue was reported, or why it was given a specific priority. And it can't track anything after merge, like how the change was tested, or whether the change was communicated to users. Maybe you don't have to deal with auditors. Maybe your work has different processes to keep them happy. But as far as I'm concerned, is it important to link the issue for context? Yes! Just yes.
- jamesrom 4y ago100% agreed. You know what's better than an issue thread? Well documented tests in a commit that reproduces the issue.
- simonw 4y agoWhy not both?