Hacker News new | ask | show | jobs
by hw 4466 days ago
IMO rebase is great as a cleanup tool right before merging the feature branch into master, especially squashing meaningless commits. I don't think squashing everything down to a single commit is a good idea though, since separate commits provide some context to the changes, and can come in handy in git blame.

On my personal project or when I'm the only person working on a branch, I only ever rebase, since that's easy to do and I like my tree clean. In a team environment though when you have different people contributing to a branch, merge might be preferable just because the branch can get screwed up if not everyone on the team is on the same page. I would probably only rebase right before merging into master and only do merges before that.