4 ms·
I didn't look at things too closely, but it would be nice if this each commit would include a ticket number from the branch (such as a linear id) and/or pr id i
by jaredsohn 1y ago
I didn't look at things too closely, but it would be nice if this each commit would include a ticket number from the branch (such as a linear id) and/or pr id in each commit for people who do not squash.
One huge advantage of squashing branches is if you see a commit in a `git blame` you might have an idea of where it came from within GitHub/Linear/other systems.
- figmert 1y agoSurely this would be the job of a prepare-commit-msg/commit-msg hook?
- jaredsohn 1y agoBuilt this: https://github.com/jaredsohn/git-linear-hook https://github.com/jaredsohn/git-linear-hook You can also use the --instructions param for this tool to name commits via the LLM.
- jaredsohn 1y agoYeah, could be a separate tool. Another tool could be a GitHub action that checks if the ids are in each commit; I built a prototype of that for work but it needs some polish and permission for a more general release. Think these tools together make non-squash PRs much easier to deal with for people who don't want to spend the extra time tidying things up. BTW, really excited to see this. I was thinking about the concept in a thread last year https://news.ycombinator.com/context?id=40765134 https://news.ycombinator.com/context?id=40765134 "I look forward to the day that I can run a local LLM (for confidentiality reasons) to automatically reorganize commits within my PR. Should be very safe compared to generating code or merging/rebasing other code since it is just changing the grouping of commits and the final code should be unchanged."