If you are doing git push origin branchname then yes that is correct.
The caveat is that you will have a different commit history from what happened, so you will need to force push your changes to click the button:
git push origin branchname -f
If you do not, you will receive a message stating that your local branch is behind. Force pressing basically says "hey, origin, take my transaction history and deal with it."
source share