git : error: failed to push some refs to xxxxx

 

原因:本地和远程的文件应该合并后才能上传本地的新文件

解决方案:

1、先拉下来,会自动合并的(不用操心)

git pull origin master

如果上述代码报错,用:

git pull origin master --allow-unrelated-histories

2、再上传

git push -u origin master

 

 

参考文章:https://blog.csdn.net/winnershili/article/details/78888548

posted @ 2019-09-12 12:50  bp9jISKIN  阅读(199)  评论(0编辑  收藏  举报