0


Git推送remote的时候报错原因

git在Rstudio推送的时候提示如下错误:

$ git push origin dev
To http://xxxxxx/Android.git
! [rejected] dev -> dev (fetch first)
error: failed to push some refs to ‘http://xxxxxx/Android.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.

原因:

其他地方向同一远端库推送了代码,导致本地不是最新的。

解决办法:

先从远端

pull一下

,或者输入命令行

git pull

,然后再push

标签: git github

本文转载自: https://blog.csdn.net/qq_40935257/article/details/125242503
版权归原作者 初于青丝mc终于白发 所有, 如有侵权,请联系我们删除。

“Git推送remote的时候报错原因”的评论:

还没有评论