View historical version
Use git log
the command to view the historical version of the project:
You can keep pressing Enter until you find the historical version you want, and copy commit
the following string id
.
Restore historical version
Execute command git reset --hard 版本号
:
git reset --hard 39ac3ea2448e81ea992b7c4fdad9252983dca2fe
Push to remote main branch
git push origin main --force
Make sure your branch names match.