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

相关推荐
faimi14 小时前
🚀程序员必收藏!最全Git命令手册:解决90%团队协作难题
前端·gitlab
rivercoder19 小时前
Gitea:轻量级的自托管Git服务
git·gitlab·gitea
运维开发王义杰2 天前
信息安全:GitLab与AWS OIDC集成的深度解析,IAM信任策略中的条件配置
云计算·gitlab·aws
运维开发王义杰2 天前
GitLab CI: 告别EC2 Instance Profile,拥抱OIDC
ci/cd·gitlab
Doris_LMS3 天前
Git在idea中的实战使用经验(二)
linux·运维·gitlab·idea
CHENBT_4 天前
mac idea 配置了Gitlab的远程地址,但是每次pull 或者push 都要输入密码,怎么办
gitlab
starvapour4 天前
在windows server 2022搭建gitlab……但是失败了
windows·gitlab
张3蜂4 天前
GitLab Boards 深度解析:选型、竞品、成本与资源消耗
gitlab
烟花的学习笔记4 天前
【科普向-第七篇】Git全家桶介绍:Git/Gitlab/GitHub/TortoiseGit/Sourcetree
git·gitlab·github·tortoisegit·嵌入式软件开发·sourcetree
张3蜂4 天前
Jira vs. GitLab Issues vs. Redmine:终极选型与成本分析
gitlab·jira·redmine