Git generally doesn't delete commits until a garbage collection is done (and assuming no other references). If you find yourself in this situation again, then try:
git reflog show remotes/origin/develop
This will show the reflog for the branch, then you can find the hash just before your push, check it out, then force push it back.
I've recovered from other developer's accidental force pushes in less than 5 minutes, with no commits lost.
If it's just a matter of "merging" couldn't you just merge those branches again? Or do you resolve conflicts on github or some such (something that's never fit my workflow but I can imagine others using it)?
During any push, the remote advertises latest SHA-1. I don't know if we actually use it in 'push -f'. But if we haven't, it's a good idea to save this in local reflog.
git reflog show remotes/origin/develop
This will show the reflog for the branch, then you can find the hash just before your push, check it out, then force push it back.
I've recovered from other developer's accidental force pushes in less than 5 minutes, with no commits lost.