I was force pushing something onto my github repository. This was the first time I was using force in a command. After the push, all of my previous commits had been removed from github. I don't know if that's the default behaviour or if I did something wrong but is there any way to restore my previous commits? I don't mind removing the forced commit if that helps.
git push -f --set-upstream origin main This is the command that I was using to push but it removed all of my previous commits.