All Articles

Articles tagged with Git


Why Squashing commits is bad

I recently had a discussion with a colleague about why squashing commits in Git pull requests, or any source control for that matter, was bad. The discussion was started with a suggestion that developers (at work) should start to follow a specific commit message format. This was so that release notes could be automatically generated based on the commits in a given release. Now to do this, and have a release note that looks sensible, it relies on very few commits per feature or bug fix, which in turn involves squashing developer's commits. While I don't object to a standardised commit message and automated release notes (in fact I'm a massive supporter of devops and build/task automation), I believe that squashing commits is a bad idea. Here's why.