News for hackers. Stuff that matters.
Re:Git commit messages are useless by smusamashah on Thursday January 25, 2024 @06:32PM (#39136936)
Depends on the codebase perhaps. I sometimes touch parts which are not directly relevant to the the task e.g. mostly a minor reactor, a minor bug fix etc. It's nice to leave a trail on that particular change that it was just a refactor instead of exploring whole changeset only to find out that this change was irrelevant.
Re:Git commit messages are useless by dier on Thursday January 25, 2024 @09:13PM (#39138182)
I've found worktrees[1] are a great tool for this use case.

"oh. i should fix this, but it doesn't have anything to do with what i'm currently solving." cd ../worktree-checkout, make a branch, do the fix, push, open a pr. then cd ../original-checkout and continue on. rebasing the fix into my wip when the PR is merged (or cherry-pick if you're confident) as needed.

1. https://git-scm.com/docs/git-worktree