I'm working on a large project at the moment and am branching off quite often to get new features in place. Then once I have finished I rebase with master, switch to master and `git merge my-feature-branch --squash`. Is that okay to do?
However if it's a small feature and your commit message is well-formed and comprehensive (ie. 50-char top line and then paragraphs of description below) then I don't see a problem squashing a few commits together.
Second, makes no sense to merge, consciously, a bug into master, specially if it's known and fixed already.
I think focusing on committing green test states often leads to faster development and more focused thinking, and I'd prefer to see this approach represented in the final commits rather than getting in the habit of squashing days and days of work into single mammoth commits.
It's not about squashing together the entire history of development.