Avatar (Fabio Alessandro Locati|Fale)'s blog

Version Control

Squash git commits

Squash git commits

August 24, 2026

I often review git pull/merge requests (PRs) both for work and open source projects. Many of those PRs have a number of commits with commit messages like “fix”, “actual fix”, “fix again”, or other similar forms. I understand why this happens, even more in repositories where it is far easier to trigger the continuous integration (CI) pipeline, rather than execute the tests manually. Having multiple commits in a PR is not problematic by itself, since it might make sense to slice the accomplished work further than 1 commit per PR, but it needs to be done in a logical way.

Read More