原因:本地和远程的文件应该合并后才能上传本地的新文件
解决方案:
1、先拉下来,会自动合并的(不用操心)
git pull origin master
如果上述代码报错,用:
git pull origin master --allow-unrelated-histories
2、再上传
git push -u origin master
扫描二维码关注公众号,回复:
7262721 查看本文章
![](/qrcode.jpg)
参考文章:https://blog.csdn.net/winnershili/article/details/78888548