GitHub推送失败

时间:2016-09-21 13:20:17

标签: git github

我正在尝试在我的GitHub存储库中推送一个android项目。但它不起作用。它显示了一些错误和提示。错误和提示如下:

error: failed to push some refs to 'https://github.com/jahid-csedu/medcino.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.

这应该是什么解决方案?

2 个答案:

答案 0 :(得分:0)

您必须从存储库中提取代码 命令是git pull origin branchname

在尝试推送代码之后再试一试,然后它就可以了。

此错误是因为处理同一项目的任何其他人可能更改了项目中的某些代码,因此您必须在推送之前提取代码。

答案 1 :(得分:0)

答案是错误的...... 一开始尝试

git pull https://github.com/jahid-csedu/medcino.git

然后push

相关问题