Comment

Comment by q7xvh97o2pDhNrh

Genuinely asking: What's the value prop of having the merge-commit in the history for you? Have you ever capitalized on it? And if so, could you share the command-line-fu that's helped you take advantage of having such a commit in your repo history?

I'm asking because I used to do exactly this and feel much the same way as you — I felt it was nice to preserve the historical context.

At some point, it dawned on me that, amidst all the anecdata I'd acquired, I'd never once benefited from having those commits cluttering up the history.

These days, I usually advocate "squash & merge" for the 80%+ of teams that lack the discipline to write good commit messages for every one of their branch commits. And, for those rare teams where every engineer writes thoughtful commit messages on their branches (a true delight!), I savor being able to do "git rebase && git merge --ff".

Either way, we end up with a lovely linear history of (hopefully) atomic commits.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton