Skip to content

Comment on Minimum Viable Git for Trunk-Based Development

Comments

This guy doesn't understand rebase. Rebase is an organizational tool. it's housekeeping for keeping your commits clean. One reason to learn how to do rebase is so that your feature branch is tidy so when you merge it to main, main itself is tidy. Another is that as you perform the exercise of cleaning up your commits you are performing code review, something that, up until this point, you've just been throwing at your co-worker without much thought as soon as all the tests pass.

"But my feature branch gets squashed anyway"

1. I believe that in itself is a mistake, especially as feature branches get large and, though you say you're all for small feature branches, your commit history says you do something different.

2. You don't clean up that giant merge commit message with all those "WIP" "fixed stupid mistake" comments in there.

Use rebase to keep your workspace clean and main/master comprehensible to your colleagues.

Here's my favorite rebase presentation. He really emphasizes keeping history clean.

https://www.youtube.com/watch?v=UWwazJ_46s0

Rebase is clearly the way to go. Clean history for the win!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.