Updates were rejected because the remote contains work that you do(git报错解决方案)

Updates were rejected because the remote contains work that you do(git报错解决方案)

今天向GitHub远程仓库提交本地项目文件时,遇到了下列错误,很是郁闷

看报错原因是我在远程做了改动

额,想起来了,昨天刚在这个项目对应的远程仓库修改了README文件

起初以为没有指定远程仓库,尝试了如下命令但还是不行

Updates were rejected because the remote contains work that you do(git报错解决方案)

解决方案:

执行 git pull 远程分支名 本地分支名

再执行git push命令,没有报错

Updates were rejected because the remote contains work that you do(git报错解决方案)

问题解决!!!

欢迎转载,博主原创,转载请注明来源,谢谢!!!

上一篇:xgboost原理及应用


下一篇:Python3.x:import urllib2报错解决方案