When I have to force a push, I want git to check one thing first: has anyone else pushed since I last looked?
git push --force-with-lease
Plain --force overwrites the remote branch no matter what is there. The docs warn that it can make the remote lose commits, and that it also switches off the other safety checks. --force-with-lease only overwrites if the remote branch is still what you expect it to be. Used without details, it expects the remote branch to match your remote-tracking branch, so the copy you got at your last fetch. If someone pushed in the meantime, the push fails and nothing is lost.
That is exactly what you want after a rebase or an amend of your own feature branch. You have to force, because the history changed, but you do not want to wipe out a teammate’s commit that you never saw.
The caveat is about the word "saw". The lease compares against what your local repo knows. If a tool fetches in the background and updates your remote-tracking branch without you looking at the new commits, the lease will happily go through. So fetch and look before you force.
Some people alias it, but I would type it out until it is muscle memory.
Further reading: git push documentation, On this site: set push.autoSetupRemote and stop typing –set-upstream, On this site: turn on rerere and resolve the same conflict only once