News for hackers. Stuff that matters.
Re:Commits are snapshots not diffs (2020) by ravenstine on Thursday April 08, 2021 @03:20PM (#26742616)
Rebasing and cherry-picking are awesome tools once you know how what they're actually doing. I think people avoid rebase for a few reasons; the term "rebase" doesn't mean anything outside of Git so it's not obvious what it is doing under the hood, and inexperienced Git users might use it to change the history on the main branch, which I see as an antipattern.

There's nothing inherently wrong with merging, but I personally don't like it because I find merge commits harder to understand than regular commits. Better to use things like rebasing and cherry-picking to move commits arbitrarily and then squash some commits into units of work that make sense.

Stash is crappy though, IMO, because it's not branch-specific. Instead of stash, I like to fork the branch I'm working on and create a "WIP" commit. That way I don't lose track of work I had in progress that only belongs in a certain branch.

Re:Commits are snapshots not diffs (2020) by Izkata on Thursday April 08, 2021 @11:42PM (#26746442)
> the term "rebase" doesn't mean anything outside of Git so it's not obvious what it is doing under the hood

Read "base" as "baseline"; that should help significantly for the simplest use of rebasing a series of commits without changing them.