Submit after revert, but there will be two commits in the history record that are useless. A wrong commit, a commit revert this wrong commit
Of course you can also use reset, such as git reset --hard <commit hash>, and then add -f when pushing to force an update. But this operation is very dangerous. If someone else has checked out your wrong commit and you reset it, others will have errors next time they pull or push.
You should only be able to roll back the version of your local repository and push it again.
Just roll back to the previous commit id and push again, but there will still be records on the remote end
Submit after revert, but there will be two commits in the history record that are useless. A wrong commit, a commit revert this wrong commit
Of course you can also use reset, such as git reset --hard <commit hash>, and then add -f when pushing to force an update. But this operation is very dangerous. If someone else has checked out your wrong commit and you reset it, others will have errors next time they pull or push.
1.Reset first
2. Modify and then commit
3. Force submission again in an evil way. . .