使用git log找到commit的版本号;git reset --hard <版本号>,撤回到需要的版本;git push origin master重新提交会报错;使用git push origin master --force。