you should check GitHub Reflog / Deleted Branches navigate here https://github.com/<your-username>/<your-repo>/branches
https://github.com/<your-username>/<your-repo>/branches
You can also see GitHub commits view to restore previous commit
Free advice: Always Pull or Backup Before Replacing