Once you git push [...] you should ideally consider those commits etched in diamond for all eternity. If you later find out that you messed up, make new commits that fix the problems (possibly by revert, possibly by patching, etc).
Yes, of course git allows you to rewrite public history, but it is problematic [...] thus it is just not best practice to do so.
Fixing mistakes
The last commit I pushed broke the site and it has to be fixed ASAP; aka All the things go wrong. Abort. Reverting isn't working and changes need to be made now!
Options:
Use custom.css in Cascade to overwrite issue
Could use GitLens/source control to view the old versions of the files you changed and copy-paste the old, working version into custom.css.
If there is a working copy of main.css on your local computer, copy into Cascade as a temp css file and update the stylesheet link in /_theme/formats/head_base file and publish.
then you can take your time and go back and fix things (see next paragraph).
The last commit I pushed broke the site but it doesn't have to be fixed ASAP; aka I've changed files, committed them, pushed to remote and need to undo the commit.
Preferred. Undo changes without rewriting git history. (revert swaps additions and deletions made in a previous commit) git revert commit-id-to-revert
or alternatively, in GitLens or Source Control, right-click on the commit you want to revert and select "Revert".
Alternate Preferred. Use GitLens to view the old versions of the files you changed and copy-paste the old, working version into the current files.
Danger.
Discard all local changes and revert to previous [commit] permanently. This rewrites history. Other developers will have to redownload the repo:
git reset --hard [commit-id-to-reset-to] Keep in mind that branching is the best solution when you want to retain the history of faulty development, yet start anew from certain point.
How to force push when having to set the css back to a much older commit.
Set test and prod branches to be "unprotected" in GitLab