News for hackers. Stuff that matters.
Re:Julia Evans: Git rebase, what can go wrong by ecnahc515 on Monday November 06, 2023 @01:25PM (#38166561)
Have you ever had to use git bisect? That's really where a 'clean' git history is important. Plenty of people never use git bisect, and that's fine too. That said it's a very useful tool when you do need it, and can drastically simplify finding when and where a regression was introduced.
Re:Julia Evans: Git rebase, what can go wrong by joshribakoff on Monday November 06, 2023 @01:33PM (#38166703)
You can bisect across the more coarse merge commits, without “destroying” history and losing the ability to bisect across more granular constituent commits. Bisect is more robust when more information is preserved.
Re:Julia Evans: Git rebase, what can go wrong by suzzer99 on Monday November 06, 2023 @03:09PM (#38168216)
This exactly. I'd rather pinpoint the issue to a small commit with only a few changes vs. "well I know which feature caused the issue, now to wade through 65 changed files."
Re:Julia Evans: Git rebase, what can go wrong by WorldMaker on Monday November 06, 2023 @03:26PM (#38168480)
You can `git bisect --first-parent` and only bisect top-level merge commits. In most cases that gets you to the ballpark of "PR that introduced the bug" no matter how dirty the commit history inside that PR had been and if you can git bisect further in that branch. In my experience that is most of what you want anyway, "PR that introduced the bug" gives more than enough context.
Re:Julia Evans: Git rebase, what can go wrong by krferriter on Wednesday November 08, 2023 @01:57PM (#38195163)
I have never used git bisect, which is maybe why I'm wondering why people care so much about curating and cleaning up git history.