Squash and Merge counts as only one contribution

Why does squashing and merging only count as one contribution for the last-touch user that performs the action? All the contributions should be counted. There’s no attribution for any other contributors. Is there a way we could have the clean history AND count all contributions?

I just squashed and merged 6 branches with over 40 combined commits, and I see 6 contributions total. I’m trying to look busy over here! :smile:

1 Like

It’s very simple: Because squashing turns it all into one commit. To give attribution to multiple people for a squash commit, you can use Co-authored-by lines in the commit message.

My personal view: Don’t use squash merges. They mess with history, and go against the concept of making each commit the smallest possible coherent step (which is helpful for searching bugs). If you want to change the commit history before making it part of the permanent record (e.g. because you have WIP commits), rebase and then merge.