In a given team, mandating the squashing of commits essentially means admitting that pull requests' branch histories tend to be far from semantically valuable. Which can be perfectly fine, as it's hard to ensure that all developers use Git in an optimal way (I'm thinking of intentful use of interactive rebasing), uniformly. The only problem I find is when squash proponents claim their choice is superior. It's not; it…
Right. The problem is that are two use cases for commits: - a historical, fine grained log of changes - and a log of merged features. There's value in keeping both of these data sets. But the commit log as it stands can't easily serve both masters. Once you can see the problem for what it is, the solution is simple. Instead of conflating these two use cases into the concept of a 'commit', we need separate tooling for…
git log --max-parents=1
git log --min-parents=2
E.g. try this on the git.git repository (not perfect there, since Junio doesn't use this pattern all the time), but it's good enough for a quick demo.The most useful convention in a DAG like git is to have the topology of your commits reflect your workflow.