-1

How can I recover from an git push --force origin main

I can't find all commit after I used git push --force origin main, only last one so can I undo my commits

1 Answers1

1

You would have to use the reflog to reconstruct the state of the branch as you want it on your machine, and force push again.

matt
  • 515,959
  • 87
  • 875
  • 1,141