I have forked repo on github
. I synced my forked repo with the production one creating an upstream
endpoint so that the command git remote -v
origin git@github.com:some_repo.git (fetch)
origin git@github.com:some_repo.git (push)
upstream git@github.com:some_repo.git (fetch)
upstream git@github.com:some_repo.git (push)
To sync, I ran this
git fetch upstream;git checkout master;git merge upstream/master
But the merge failed with tons of conflicts. So I decided to force the merge and ran
git push --force upstream master:master
thinking this should force from the upstream master branch into my local master branch.
The problem is that I misled and it seems that state of my forked repo have been pushed on the remote upstream branch so that I lost all the commits on the upstream remote branch, this one being formerly ahead from the actual state of my forked repo. How can I recover the actual state of the upstream remote branch ?