欢迎光临
感谢一路有你

Git 提交时出现错误error: failed to push some refs to

如果你对该文章中的内容有疑问/不解,可以点击此处链接提问
要注明问题和此文章链接地址 点击此处跳转
 

使用git  push提交代码时提示如下错误:

error: failed to push some refs to 'git@github.com:....." Updates were rejected because the remote contains work that you do not have locally.

This is usually caused by another repository pushing to

大概原因就是 意思是本地和远程的文件应该合并后才能上传本地的新文件

解决方案

1、先从远程拉下来(pull),会自动合并的

git pull origin master

2、再上传

git push -u origin master

成功解决问题

赞(0) 打赏
未经允许不得转载:王明昌博客 » Git 提交时出现错误error: failed to push some refs to
分享到: 更多 (0)

相关推荐

  • 暂无文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

×
订阅图标按钮