GitHub推送失败

GitHub推送失败

问题描述:

我想在我的GitHub存储库中推送一个Android项目。但它不起作用。它显示了一些错误以及提示。错误和提示如下:GitHub推送失败

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. 

这应该是什么解决方案?

+6

拉你推前。 –

+0

拉动后也不起作用 –

+0

你仍然得到相同的错误?你有没有确定拉是成功的?在拉取成功之前,您可能需要进行本地更改。拉动可能会导致合并冲突,在您最终推动之前您必须首先解决并承诺提交。 – Eelke

你必须从资源库中 命令拉代码的git拉出身BRANCHNAME

尝试此之后,尝试推动代码,然后它会奏效。

这个错误是因为任何其他工作在同一个项目上的人可能已经改变了项目中的一些代码,所以你必须在推动它之前拉取代码。

的答案是错误的... 在第一次尝试

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

然后push

+0

我拉了然后推。但也显示相同的消息 –

+0

你有本地文件中的readme.md吗? –