I accidentally force push my local file

I edit README.md of my repos online (Which was never be pulled to local).

And in my local there were README.md that contain only 1 line.

Then I accidentally force push from local and my online README.md was overwrite from the local one.

Are there anyway to recover this?

I have tried this but I can’t find the HEAD{x} that contains my README.md online

https://github.community/t5/How-to-use-Git-and-GitHub/I-accidentally-force-pushed-to-my-repo/m-p/80#M13

1 Like

Hey @paraduxos, thanks for being here. Please see here: https://github.blog/2015-06-08-how-to-undo-almost-anything-with-git/ for a guide on how to undo almost anything with git. 

Let me know if you have any follow up questions.