1、查看提交记录 git log --oneline # 简化的提交历史(推荐) # 或 git log # 完整提交历史 2、版本回退 git reset --hard <commit-hash> 3、如果已推送过代码到远程仓库,需强制推送更新 git push -f