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

相关推荐
测试开发技术2 天前
git rm 命令与系统的 rm 命令有什么区别?
git·gitlab·github·面试题
云和数据.ChenGuang3 天前
关闭 GitLab 升级提示的详细方法
运维·自动化·gitlab·es运维
读创商闻3 天前
极狐GitLab CEO 柳钢——极狐 GitLab 打造中国企业专属 AI 编程平台,引领编程新潮流
人工智能·gitlab
小川zs3 天前
gitee某个分支合并到gitlab目标分支
gitee·gitlab
你的人类朋友3 天前
✨【GitLab】【CI/CD】核心概念一览
gitlab·自动化运维·devops
Gold Steps.4 天前
基于 Gitlab、Jenkins与Jenkins分布式、SonarQube 、Nexus 的 CiCd 全流程打造
运维·ci/cd·gitlab·jenkins
咚咚?4 天前
基于gitlab 构建CICD发布到K8S 平台
容器·kubernetes·gitlab
荔枝吻8 天前
【保姆级喂饭教程】GitLab创建用户规范,分支开发规范,提交日志规范
gitlab·git规范·分支规范
云畅新视界8 天前
从 CODING 停服到极狐 GitLab “接棒”,软件研发工具市场风云再起
人工智能·gitlab