![](/img/trans.png)
[英]Updates were rejected because the tip of your current branch is behind - but why?
[英]How can I solve “Updates were rejected because the tip of your current branch is behind”?
在您的屏幕截图中,您可以看到 3 个提交,两个提交已连接,测试和删除测试,但是您的最新提交没有父级,因此没有相关历史记录。
origin/master
没有有用的代码) 从提交消息来看,您在最近一次提交之前有一个空的仓库。 在这种情况下,我会通过执行git push -f
来强制替换远程设备上的内容。
请注意,这将删除标记为test
的提交并remove test
。
origin/master
) 使用git cherry-pick
到您的本地主机中。 始终从最旧到最新执行此操作。
git cherry-pick <commit hash>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.