【Git报错】error: failed to push some refs to 'https://gitee.com/lhm8013609/mldl_-learning-notes'

报错:

 

 出现错误的主要原因是gitee(github)中的包括一些README.md等文件不在本地代码目录中 

解决方案:

1、此时我们要执行下面的命令把相关文件拉到本地

git pull --rebase origin master

 

 2、再次用下方命令将本地的master分支推送到origin主机

git push -u origin master

 

 至此,就成功了。

 

posted @ 2021-07-03 15:49  程序员龙一  阅读(429)  评论(0编辑  收藏  举报