当前位置: 首页 > 工具软件 > updates > 使用案例 >

Updates were rejected because the remote contains work that you not have locally.

苏浩瀚
2023-12-01

Updates were rejected because the remote contains work that you not have locally.
翻译过来就是 更新被拒绝,因为远程包含了你本地没有的工作。
这通常是由于另一个版本库推送了

如何解决:
1.确保你当前的分支(release/R20220406)已经是最新的代码
并且,有可能其它分支commit到这个分支,却没有push到这个分支,所以简单的git pull是没有用的。

git pull origin release/R20220406 --allow-unrelated-histories

所以我用了这行命令将不管是commit还是push的东西全都拉取下来

然后重新commit后,重新push就解决问题了

git push origin HEAD:release/R20220406
 类似资料:

相关阅读

相关文章

相关问答