git force push

C++
git push origin --forcegit push --forcegit push origin <your_branch_name> --force
git push -f <remote> <branch>
# example: git push -f origin mastergit push -f
Source

Also in C++: