DEV Community

Discussion on: ⛔ Squash commits considered harmful ⛔

Collapse
 
kevingranade profile image
Kevin Granade

As with all blanket statements, you're wrong :)

I do agree with a caveat, which is that as your contributor maturity increases, merges becone the dominant option.

IF a PR is composed of well-formed, meaningful commits, you should probably merge.

If a PR is composed of point-in-time or fix-fix-fix commits, and/or the individual commits don't build and pass tests, then you should squash them.

The point you're missing is that individual commits within a branch might be data, or they might be noise.

Collapse
 
wesen profile image
Manuel Odendahl

Agree, I ask people to put some effort into their own git histories. It not only provides better information for the rest of the team, but it also helps structure your own development workflow, and help you debug / bisect your own stuff.

That said, I like having a bunch of fix fix wtf wip wip commits still, because it still provides insight into what people struggled with, what their thinking process was, and gives a starting point when looking for some hairy stuff.