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

相关推荐
运维开发王义杰17 小时前
YAML:锚点深度解析,告别重复,拥抱优雅的配置艺术
ci/cd·gitlab
hkNaruto2 天前
【Docker】openEuler 使用docker-compose部署gitlab-ce
docker·容器·gitlab
hl04065 天前
GitLab CI + Docker 自动构建前端项目并部署 — 完整流程文档
ci/cd·docker·gitlab
先天打工圣体的男人5 天前
Linux环境gitlab多种部署方式及具体使用
运维·git·gitlab
委婉待续5 天前
基于linux环境在centos7上部署gitlab
gitlab
疯狂吧小飞牛9 天前
基于ubuntu搭建gitlab
linux·ubuntu·gitlab
__Smile°11 天前
Gitlab+Jenkins+K8S+Registry 建立 CI/CD 流水线
linux·ci/cd·docker·kubernetes·gitlab·jenkins
某某11 天前
gitlab启动失败,如何解决
gitlab
yangrenrui11 天前
GitLab:一站式 DevOps 平台的全方位解析
运维·gitlab·devops