gitlab 转移项目

git clone 旧项目url

git remote rm origin

git remote add origin 新的url

git push origin master:master --force

报错

error: src refspec master does not match any

error: failed to push some refs to xxx

查看当前分支 是否为master,如果为main,创建master分支

git checkout -b master

再提交

git push origin master:master --force

如果过程中报

fatal: 'origin' does not appear to be a git repository

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

请再次

git remote add origin 新的url

相关推荐
裁二尺秋风12 小时前
CI/CD — Pipeline的使用以及Blue Ocean多分支流水线的使用方法
ci/cd·gitlab·jenkins
CC码码2 天前
管理你的多个 Git 密钥(多平台多账号)
git·gitlab·github
CC码码2 天前
管理你的多个 Git 密钥(单平台多账号)
git·gitlab·github
兔老大RabbitMQ2 天前
GitLab详细分析
gitlab
小道仙9715 天前
gitlab对接,gitlabRestApi,gitlab4j-api
java·git·gitlab
tswddd15 天前
项目:Gitlab HSD CI/CD总结
ci/cd·kubernetes·gitlab
许_安16 天前
docker中部署gitlab
docker·eureka·gitlab
Haoea!16 天前
持续集成 CI/CD-Jenkins持续集成GitLab项目打包docker镜像推送k8s集群并部署至rancher
ci/cd·gitlab·jenkins·rancher
xiaodaiwang16 天前
获取gitlab上项目分支版本(二)
gitlab
极小狐16 天前
GitLab CVE-2025-4278 安全漏洞解决方案
ci/cd·gitlab·devsecops·devops·gitlab升级·极狐gitlab·安全升级