Along with the other replies here, there is also the question of force pushing (a.k.a. history rewriting) and the surrounding etiquette.
While there are no hard and fast rules, I’ve found that in circumstances where a branch is seen as being your own private branch (that just so happens to be in public on GitHub) then force pushing is fine, and even required when tidying up work prior to a PR being accepted.
Whereas in branches that are seen as collaborative and public then force pushing is a no-no.
For most projects this usually means that branches on the main repo are never force pushed to, but that it’s okay to do it on your own forks.