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

相关推荐
霸道流氓气质7 天前
GitLab CI/CD 完全指南
linux·ci/cd·gitlab
sbjdhjd7 天前
从零搭建企业级 CI/CD(下):Jenkins+GitLab+Harbor 全链路实战指南
git·servlet·ci/cd·云原生·云计算·gitlab·jenkins
用什么都重名8 天前
Git 合并两个无共同历史的分支:从报错到解决全记录
git·gitlab
master3368 天前
GitLab (Docker) 常用命令及解决方案清单
docker·容器·gitlab
qq_356408668 天前
GitLab 单机私有化部署文档(基于 Docker 环境)
docker·gitlab
lisanmengmeng10 天前
gitlab 免密配置
linux·服务器·gitlab
求知若渴,虚心若愚。10 天前
Jenkins 自动化流水线(CICD)
运维·自动化·gitlab
mnasd12 天前
Gitlab + Jenkins 实现 CICD
运维·gitlab·jenkins
鹤鸣的日常12 天前
前端运行时动态环境变量方案
前端·react.js·docker·前端框架·vue·gitlab
starvapour12 天前
Ubuntu部署gitlab频繁出现502的问题
linux·ubuntu·gitlab