A
A
Arbuzik3452021-02-24 13:58:38
git
Arbuzik345, 2021-02-24 13:58:38

How to restore commit history in GitHub?

I applied the git push -f origin main command, after which the main branch on the github with 22 commits was replaced and 1 current commit remained. Q: How do I recover 22 lost commits?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
toxa82, 2021-02-24
@toxa82

git checkout ORIG_HEAD and look at the commits, should switch to the right ones. Then push with force

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question