Execute 'git log' to find the commit you want to rollback to. The terminal should show something like this.
$ git log commit 4bc90d5e397fc13f086f76132206be6de8e42a (HEAD -> main, origin/main, origin/HEAD) Author: Pietje <pietje@tostie.com> Date: Tue Aug 2 14:29:54 2022 +0200 "bad commit" <--- last push to the server commit 7d880ea2eabe5454437d44427c3eea5822897a Author: Pietje <pietje@tostie.com> Date: Thu Jun 23 10:19:57 2022 +0200 "good commit" <--- previous push to the server
$ git reset --hard 7d880ea2eabe5454437d44427c3eea5822897a $ git reset HEAD~1 $ git stash $ git add -A $ git commit -m "I promise not to do it again" $ git push --force
That should undo (rollback) the last pushed commit and bring client and server in sync again. Use it at your own risk!