Skip to content

Recover commits deleted by force push #22221

Discussion options

You must be logged in to vote

I asked GitHub support privately and they helped me resolve it! Here’s their reply

It’s possible to restore your repository’s state if you know the last commit before the force push. You can replace the /commit/ part in the URL with /tree/ to reach the tree view for that commit. Let’s say you know the commit SHA, in this case it’s 84a0cd765a211cbfdf539aa7e8d22d0aa0d463b9.

In your browser, you can navigate to the repository’s state at that commit (the Tree View):

https://github.com/PatrickF1/fzf.fish/tree/84a0cd765a211cbfdf539aa7e8d22d0aa0d463b9

From here, you can create a new branch by clicking the 84a0cd765a button, and typing in a name for it. That would create a branch from your repos…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant