The story told in the article mainly shows to keep your PR focused. You can squash as long as you don't do 2-week-long 37-commits branches.
A lot of higher level tools don't expose this functionality but it's not like it's not there.
For context, my career has been in web development start ups, which generally reward the cavalier and tolerate the careful.
Any one person can muddy the history up (by ruining bisect, say), but any one person can also improve it (by leaving good notes and right-sized commits whenever possible).
If a strategy demands perfection, it sounds like wishful thinking honestly.
The commit history is performance art. You don’t need to know that I left out a comma. Or that I tried to make a bit of code easier to read but introduced regressions in the process (that also breaks bisect). You do need to know that I changed this code over here because I changed the code over there and broke something, because I either missed something or you’ll have the same issue the next time.
Do you have a good way to deal with this?
My one liner for viewing the git log is: git log --oneline --all --decorate [--graph]
I haven't tried, but I bet HEAD~n works for --fixup, or some quick rev-parse magic (which I don’t know much of).
Especially "git rebase -i -r" is an incredible tool.
This will leave all of the final changes in the index, "squashing" any churn. From there, individually stage lines/chunks into a small handful of atomic commits for the PR.
In contrast, if you instead merge, you only have to resolve conflicts once, for the merge commit.
That being said, I tend to be very fastidious about cleaning up my history before pushing, even if it means tedious, repetitive conflict resolution. But I do understand that other people might not think it's worth the trouble.
That said, I must say that I've personally experienced as a pain, so I don't actually do that.
git fetch
git merge origin/master
git reset origin/master
git commit
There's a middle ground though: rebase your commits, but not necessarily into a single one. Before I submit a PR, I rebase my branch (which has lots of small commits, some of which undo previous work or are a work-in-progress), and make sure that every commit is as small as it can be without including work that is halfway done (so all tests still succeed), and have a clear description of what they're doing.
I then have both a nice history, and I can bisect to find a problematic commit, or inspect the commit history of a single line to get more context about it.