I committed my changes and tried to push it to Github. It failed because one of my files was too large. I realized that a mistake I had made earlier had generated a very large XML file, so I fixed the problem and tried committing and pushing again. It's still trying to push the bad commit instead of the one I had just made.
How can I tell Git to ignore the bad commit and instead push the most recent one? I have tried looking it up, and I'm seeing people recommending different commands and different methods of doing it. I am new to Git, so I want to be sure of what I'm doing before I screw something up.