Once you perform a hard reset, your working tree and index are now at the state of the commit that you performed the reset to. The next time you create any commit you will have a new, divergent history for your repository (and the branch you were working on).
To resolve this, use --force
when pushing to Github; this will indicate that you acknowledge that you will lose history by forcibly pushing your new, rewritten history to the repository.
Caveats: In general, --force
is dangerous, especially if you're unsure of how you got to a state of needing it. There is typically no way to easily undo a faulty forced push. That said, if the commits you're trying to wipe out had something sensitive such as API keys, passwords, or the like, I'm not certain that this will guarantee that the commits will be irrecoverably wiped out.