Absolutely does not belong in automatic anything, anywhere.
I mostly use --force-with-lease to push something to my own branches. No need to talk to anyone.
Force pushing to other people's branches without asking is just rude.
* push some commits up to my remote branch
* git fetch
* git rebase master/main to get the latest stuff
* add changes on my-branch that use new stuff from master/main
* git push --force-with-lease to my remote branch - this fails if you don't use some version of force since my most recent commit is based on a commit (from master) not on the remote branch
This way we never had to force anything on the remote.
The merge commit will be in the branch.
> There is no rearranging, it is one commit.
You misread that. They want to be able to rearrange things easily. Having multiple merge commits in the middle gets in the way of that.
Commits don't matter either, because they are being squashed. Was responding to the grandparent perhaps more than the parent.
Or you mean that a mistake where you accidentally push to someone else's branch?
The default model that public github uses is good for that: everyone works on their own fork of the repo, and makes pull requests to the shared repo. Nobody pushes directly to the shared repo.
Unfortunately I've met far too many who have your "remote" superstition. I remember arguing this exact point in my last gig, when someone was mad at me for force pushing my own remote branch that nobody else was using nor should have been.