git回退版本方法 不爱说话的深海鱼 2020-07-16 247 阅读1分钟 reset(不推荐) 通过reset,把head指针指向之前某次提交,但是后面版本找不到(不推荐) revert(推荐) 生成新版本,提交记录也会保留 步骤: 1.找到之前误提交的版本号 2.git revert -n 版本号 3.git commit -m xxx 提交 4.git push 推送到远程 5.然后喊你的小伙伴更新版本就可以啦