[EDIT: The answers to this question throw away history, if that is not what you want then ignore this question].
[EDIT: The answer that CodeWizard pointed to as a duplicate is not a duplicate because this question makes it clear that I want to throw away history. Also, none of the answers in that question are nearly as good as the one that this question received]
I just did a commit and a push of some code that was a complete mistake.
I want to completely back out that commit and push as tho it never happened.
I do not want the code left in the commit history.
No one has done any other commit and push.
This question is different because I am asking people not to post alternatives unless they achieve exactly the same thing (throw away all history). The reason is: I have tried to google this and I get questions that are cluttered with answers that provide alternatives but it is not clear if those alternatives throw away the code or keep the code in the git commit history.
This question is constrained to: 1) Throw away last commit/push only. 2) All history is of that commit/push is gone from the repo.
I am putting those constraints on it so we get the simplest answers possible.
I am using git command line and tortoise git against gitlab.