git返回到上一个版本:1.首先查找版本号: git log
2 .确认恢复到指定版本: git reset --hard f5c706a6、f5c706a6是版本号
3 .强制本地代码与远程仓库同步: git push origin master --force,master主分支
4.error : git : youarenotallowedtoforcepushcodetoaprotectedbranchonthisproject
由于git保护机制,无法强制提交代码。 远程仓库设置要求您取消对代码的保护,更新代码,然后再进行保护。