git log 查看提交历史 找到最后一次提交之前的commit id执行git reset回退本地代码到正确的代码版本 git reset --hard 版本号 如果是回到最后一条的前一条,用 git reset --hard HEAD~强制推送本地代码到远端 git push --force