Commits to squash can start with [squash] and when you rebase they are automatically squashed.
Re:Squash your commits
by codingWithGit on Friday April 01, 2016 @04:00PM
(#11408056)
If I feel like the history of a branch is important, I add a git tag to the branch head before rebasing. I have a naming convention for these tags.
Then I usually do a rebase -i on to the main branch.
I'd love to see a commit linter, that points at commits with text like "oops" and "fix my derp" to suggest possible commits to squash.
Git history shouldn't resemble a hot mess, but the evolution of code should be pretty granular. I'd take the hot mess over full squashing, though.