git push force main code example Example 1: how to push force git git push origin <your_branch_name> --force Example 2: git force push git push -f