scene:
One day, after you wrote the code, you accidentally git push origin -f
forced the local code to be overwritten, and all the commit records were gone.
recover:
Use the following command to view the commit log:
git reflog
Use the following command to restore:
git reset --hard 想要回退的版本号
git push origin -f
Then revert to the version you want