It's my understanding (also from the accepted answer) that git push --force will overwrite all data on the remote branch with the local one.
By amending commits, you have already overwritten your git history ( by changing commit's SHA1). Amend
is fine as long as you haven't published your changes, but once you do, you really shouldn't be mucking around with the history, because if someone already got your changes, then when they try to pull again, it might fail. Instead of amending a commit, you should just make a new commit with the changes.
What happens if I amend a commit message and try to push without -f or --force?
Git will refuse to update the remote branch with your branch (having amend public commit) because your branch's head commit is not a direct descendent of the current head commit of the branch that you are pushing to.
If this were not the case, then two people pushing to the same repository at about the same time would not know that there was a new commit coming in at the same time and whoever pushed last would lose the work of the previous pusher without either of them realizing this.
Why is force-pushing after changing a commit message necessary?
As i have mentioned above, git will not allow to push to a remote branch. You can read this question. It has many possible workaround to this problem.