Does Squashing Commits Change the Stats in GitPrime?
Yes, you'll see some change in the reports when Squashing.
From Git's perspective, Squashing is a form of historical ‘revisionism’ and alters the Git record. Right now, we've taken the approach of staying true to the Git history, and so you'll see some change in the reports when this is changed.
For some context, here's a blog post: What Really Happens When You Squash Commits.
Actual changes in stats will vary a bit depending on what’s being Squashed.
Here's a great math analogy to illustrate how squashing will end up affecting the rolled-up statistics:
Suppose you have this math expression:
2 + 3 - 4 + 6 - 8 + 3 = 2
Squashing this thing would be like placing parentheses somewhere in the middle:
2 + 3 - (4 + 6 - 8) + 3 = 6
2 + (3 - 4 + 6 - 8) + 3 = 2
2 + 3 - (4 + 6) - 8 + 3 = -10
What’s curious is that as long as you're only Squashing additive parts, it's still possible to sometimes get the same results as before Squashing:
(2 + 3) - 4 + 6 - 8 + 3 = 2
So the effect on stats will depend a bit on the exact changes you're Squashing.