1

Due to some bugs I couldn't solve, I've cloned my last GitHub repo commit. The app started working again. Then I pushed it back to the same repo, but the commits number got reseted to 1. Any way I can undo this?

Mateen Ulhaq
  • 24,552
  • 19
  • 101
  • 135
Rony M.
  • 405
  • 1
  • 7
  • 16

1 Answers1

1

To go back to the state before your git push --force, check the output of git reflog

Or look at the events in your GitHub repository

The idea is to reset locally to what you had before, then force push again, in order to reset the remote repository to its previous state.

Then you can clone again, make your fixes, add, commmit and do a regular push.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250