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 有冲突 。
|