I, too, would like to see an
--autosquash option in the web interface.
Github’s support for working with forced pushes is less than stellar. In general it’s hard to figure out what changed between revisions and in turn this makes it harder to keep track of comments. Only for providing a comparison point, Gerrit supports a workflow where forced pushes are more common, only that it does not call it that, nor are those necessary. In Gerrit each revision gets its own pseudo-branch so it’s possible to compare between revisions as if you were comparing branches. In Github by contrast this does not exist, so there are two options:
Add new commits, never force-push. If the intention of the developer is to merge a single commit, they can choose to squash the whole thing and all the PR noise disspaears. If they don’t do this and simply merge the PR as is, you end up with a lot of PR noise in the repository (“fixing linter errors”, “addressing comments”, “fix build error”, “merge master into …”, etc).
Locally fix the commits, force-push. This keeps a clean history, but it makes it harder to work with the web UI.
Option 1 also makes it hard to create a PR that contains multiple clean steps: “adding API for this”, “using new API for that”, etc.
If Github supported the git convention of “fixup!” it would be possible to use 1. and simply rebase and squash when it’s time to merge the PR into the target branch. This would make it easier to keep track of the changes and comments, and works better with the existing web UI.