Git commit之前没有pull,结果本地文件不是最新的: 1、撤销提交 git reset HEAD~1 2、更新本地代码 git pull 3、提交 git commit 4、推到服务器 git pull