Dr. Derek Austin 🥳
1 min readJan 28, 2024

--

Hey Jett! Thanks for sharing your thoughts. We use PRs (and the associated merge commits) to group tasks, like adding features or fixing issues.

It is definitely easier to sort through squashed commits, but we can still easily cherry-pick and revert the entire PRs by using merge commits.

Even better, we get to see some additional documentation on *why* every single line changed, beyond just "well I was fixing a bug, and I can't remember why I changed that line."

I find that the flexibility to cherry-pick or revert only certain commits, even after merging the PR, is more useful than the cleaner history from the squashed commits.

Especially since I merge *all* the work in my entire work repo after I review my employees' work, squash commits would mean even losing the authorship information to know "which programmer last worked in this area?"

Have a good one!

--

--

Dr. Derek Austin 🥳
Dr. Derek Austin 🥳

Written by Dr. Derek Austin 🥳

Hi, I'm Doctor Derek! I've been a professional web developer since 2005, and I love writing about programming with JavaScript, TypeScript, React, Next.js & Git.

No responses yet