What do you think about squashing #Git commits before merging a feature branch into master?

Please elaborate in comments.

Boosts are welcome!

@pfm Each commit should be an atomic change with an informative commit message. If you have multiple commits in your feature branch because you cleaned up your code or fixed bugs, then it's fine to squash it into a single commit. You should not squash commits which make unrelated changes into a single commit.

I often find myself looking at git blame to figure out why a part of code was changed, and if the commit I find comprises of 10 squashed commits, then it's difficult or impossible to tell.

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!