Comment

Comment by obelos

Why no squash? It's a private dev branch, so it doesn't throw off anyone else's work. Just commit to your heart's content for every little experiment. Write trivial commit messages like “checkpoint” because `git show` will contain so little code it's easy to figure out what's what. If you later decide you've headed down the wrong path, `git checkout -b my_feature_take2 HEAD~n` and start back up from a known point. When you have a functional final result, `git rebase -i master` to squash and groom the commits into more meaningful aggregations. Or just a single commit, if it makes sense for the context.

Interactive rebasing with fixup/squash makes the end result very readable. `git reset` and `git add -p` can also be a huge boon when tidying up a branch before PR.

parent obelos 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton