wei / pull

🤖 Keep your forks up-to-date via automated PRs

Home Page:https://github.com/apps/pull

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undo force push?

CorneliousJD opened this issue · comments

I am admittedly not very well-versed in git/github, but wanted to setup Pull to auto-update at the suggestion of a repo owner.

However it discarded the commits I had above the branch when it did a force-push.
How can I roll back that force push and get back to where I was so I can manually merge the updates w/out discarding my own?

I DID make a backup of code files first but I don't know how to handle this situation to fix things. Any advice is appreciated.

@CorneliousJD

TL;DR: You can't. The best you can do is to force push a local copy of the repository to GitHub if you have it. If you don't, then the whole codebase is gone.

Force pushes are something you should virtually never do: you not only run the risk of losing your commit history, but also always break any integration that depends on it.

I suggest closing this one too @wei .

@CorneliousJD if you can close it yourself, even better.