If you modified git's history and the change was already pushed, you will usually get a
! [rejected] my-branch -> my-branch (non-fast-forward)
error, when trying to push.
You can force the push, with
git push --force origin my-branch
Only do this to instantly fix a mistake, or when you know exactly what you're doing.