提示git error: failed to push some refs to 'git@github.com:
2017-06-15 22:54
555 查看
今天重新安装了Git,远程推送到Github上进行测试,在GitHub上的仓库是存在的,在远程推送时总是出现以下错误:
不要慌
这是因为你有远程库中的文件没有下载下来。所以你需要先运行
然后你就看到了远程文件已经下载到你的工程里面并且自动合并了。
然后你需要在本地库中添加新文件并且提交。
然后你运行
,
问题解决!!!!
$ git push -u origin master To git@github.com:xxx/xxx.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@github.com:xxx/xxx.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
不要慌
这是因为你有远程库中的文件没有下载下来。所以你需要先运行
git pull origin master
然后你就看到了远程文件已经下载到你的工程里面并且自动合并了。
然后你需要在本地库中添加新文件并且提交。
然后你运行
git push -u origin master.
,
问题解决!!!!
相关文章推荐
- git - error: failed to push some refs to 'https://github.com/xuzhezhaozhao/Practice.git' 解决办法
- error: failed to push some refs to git@github.com:damononliu/cv_python.git
- 在github上传项目遇到的问题(error: failed to push some refs to 'https://github.com/CrazyDony/text.git')
- 解决git error: failed to push some refs to 'git@github.com:
- Git提交数据失败 error: failed to push some refs to 'https://github.com/XXXXXXX/gif.git'
- git push报错error: failed to push some refs to 'git@github.com:
- git上传到一半最后报error:failed to push some refs to 'git@github.com:yourname/repositoryname.git'
- error: failed to push some refs to 'git@github.com:GoodMemery/mytest.git'
- 解决git error: failed to push some refs to 'git@github.com:
- [Git & GitHub] 解决办法:error: failed to push some refs to 'https://github.com/xxxx.git'
- git - error: failed to push some refs to 'https://github.com/.......git'' 解决办法
- git push报错error: failed to push some refs to 'git@github.com:
- error: failed to push some refs to 'git@github.com:jack-don/elema_vue.git' hint: Updates were reject
- error: failed to push some refs to 'git@github.com:
- error: failed to push some refs to 'git@github.com:....." Updates were rejected because the remote c
- error: failed to push some refs to 'git@github.com:yourname/repositoryname.git'
- error: failed to push some refs to 'git@github.com:xxxxxxxx.git'
- 【已解决】github中git push origin master出错:error: failed to push some refs to
- error: failed to push some refs to 'https://github.com/.....'
- git报错- failed to push some refs to 'git@github.com:***********/***.git'