I just ran
git push -f by mistake, thus overwriting a remote branch.
(remote origin:) branch master -> commit aaaaaaa branch foo -> commit bbbbbbb (local) branch master -> commit ccccccc branch foo -> commit ddddddd
git push -f:
(remote origin:) branch master -> commit ccccccc branch foo -> commit ddddddd
In my local repository, I'm working on the
master branch, so I can restore the branch
master to commit
aaaaaaa, because I can get commit
git reflog. However, I couldn't get commit
bbbbbbb because I didn't pull before
git push -f.
I have tried
git reflog in the remote repository, but there's nothing useful in reflog in the bare repository.
How can I restore the branch
foo back to commit
bbbbbbb in the remote repository?
(P.S. I don't know the actual value of