The correct next step in your workflow after the hard reset should have been to force push the branch to GitHub:
git push --force origin jsonadd
The force push is required because you rewrote the history of this branch by resetting it. Without force pushing, any subsequent commits you made locally cannot be applied by GitHub, which would be unable to relate the commits to the original history which still exists on the remote.
I mentioned the "correct" next step you should have taken, but, most of the time, rewriting the history of a Git branch which has already been published is not desirable. It is not desirable because doing so can cause problems for anyone else sharing the branch. Such users would encounter the same errors you are facing now, which prompted you to post a question here. A much better strategy would have been to revert the two most recent commits:
git revert HEAD~2..
This option would apply two new commits which would functionally undo whatever the two most recent commits were doing. If you just want a single merge commit, then use:
git revert --no-commit HEAD~2..
Note that the git revert
approach is safe with regard to your branch possibly being shared by other users. Should they pull your revert work, nothing unexpected would happen apart from the removal of certain features intended by the revert.