其他分享
首页 > 其他分享> > 2021-10-20

2021-10-20

作者:互联网

Gitlab 错误:rejected Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref. You may want to first integrate the remote changes before pushing again.

今天尝试使用VS2019将项目推送到Gitlab,推送时报错”rejected Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref. You may want to first integrate the remote changes before pushing again.“
快速解决方法:
在VS2019的Git 栏里创建一个新的分支,然后推送到Gitlab后再作分支合并,最后VS2019再同步即可解决。
原因是:在Gitlab创建新项目时的main 和VS2019 创建远程仓库时生成的main 有冲突 。

标签:10,Gitlab,20,VS2019,pushing,rejected,2021,remote,推送
来源: https://blog.csdn.net/u010528453/article/details/120869893