强制回退代码 前言步骤1. 查看历史2. 根据commit ID回退3. 强制推送仓库4. 拉取最新代码 前言 本篇来学习下如何将代码回退到历史的某次提交 步骤 1. 查看历史 查看想要回退提交的commit ID git log 2. 根据commit ID回退 git reset --hard commit_id 3. 强制推送仓库 git push -f 4. 拉取最新代码 git pull