0

I’ve haphazardly initialized a fresh git repository and did a ‘git push —force’ to my existing repository on github.

Now, the entire commit history is gone. Is there any way to reverse this?

ICW
  • 4,875
  • 5
  • 27
  • 33
  • The easiest way to solve it would be if you had the latest version locally. Then you can just restore the branch from your reflog. If there were changes in that repo that you didn't have locally, then it might get more complicated. – Joachim Sauer May 18 '21 at 19:37
  • When you did the push, it had to show you the previous revision in the remote repo. – eftshift0 May 18 '21 at 19:46

0 Answers0