这种错误的主要原因是你的远程仓库的内容有改动但是你本地并没有拉去最新的代码所以会报错 git pull origin master --allow-unrelated-historiesgit add .git commit -m “内容”git push origin master