1

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.

Matt
  • 13
  • 2

1 Answers1

1

Git tracks your commits and tries to push them at once. i.e. now git is trying to push your bad commit + your good commit. You need to "undo" the bad local commit, this answer should help you take care of it.

Community
  • 1
  • 1
dubes
  • 5,324
  • 3
  • 34
  • 47