Take a look at this answer: http://stackoverflow.com/questions/1270514/undoing-a-git-push#1270608
– pierrefevrierMay 19 '15 at 16:47
This has nothing to do with the fix. And based on what I see, there is not fix except for asking another dev who cloned the repo to re-push the branches.
– VladimirMay 19 '15 at 17:29
your repo should contain a log/refs/heads which should contain previous commitish values the ref used. You can always manually revert your mess up via git reset --hard . Followed by another git push -f, no?
– whoisjMay 19 '15 at 18:32
No, doesn't work with my copy. When you do 'git push -f --mirror' all of the local branches that I haven't explicitly checked out disappear as well. When I did 'git branch -avvv' only the couple of branches that I worked on showed up. I had to ask someone to resubmit all of the branches. Never run this command! :)
– VladimirMay 20 '15 at 01:03
This worked for me, if you got the latest refs somewhere: https://stackoverflow.com/a/53662585/6012789
– SagreDec 07 '18 at 02:59