logoalt Hacker News

geonyesterday at 10:18 AM1 replyview on HN

To get a commit history that makes sense. It’s not supposed to document in what order you did the work, but why and how a change was made. when I’m knee deep in some rewrite and realize I should have changed something else first, I can just go do that change, then come back and rebase.

And in the feature branches/merge requests, I don’t merge, only rebase. Rebasing should be the default workflow. Merging adds so many problems for no good reason.

There are use cases for merging, but not as the normal workflow.


Replies

cluckindanyesterday at 10:49 AM

That is just not true. Merging is so much less work and the branch history clearly indicates when merging has happened.

With rebasing, there could be a million times the branch was rebased and you would have no idea when and where something got broken by hasty conflict resolution.

When conflicts happen, rebasing is equivalent to merging, just at the commit level instead of at branch level, so in the worst case, developers are met with conflict after conflict, which ends up being a confusing mental burden on less experienced devs and certainly a ”trust the process” kind of workflow for experienced ones as well.

show 2 replies