Should we use git squash?

I would propose using git squash for merging from feature branches for the following reasons:

  1. Cleaner master git – no noise from how the development of the feature went on – a single commit for a feature
  2. Possibility to update the final commit message – remove typos, update the description, etc.
  3. A clear place where to put the link to a feature/bug here on community

I think it is useful and I see cases where it is really good to do so. But I’m not sure about making it rule. The person, who is merging should be able to decide whether to squash or not.

Interesting - when using Squash the commit is made directly to the repository – without the link to the pull request.

Example squashed commit:

Original PR: