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

相关推荐
11路没有终点14 小时前
GitLab CI/CD 高级模式实战:include 模板库 / trigger 子流水线 / matrix 并行
ci/cd·gitlab
11路没有终点15 小时前
GitLab CE CI/CD 入门指引手册:从零搭建第一条流水线
ci/cd·gitlab
2501_928996221 天前
Agent 开发的 API 选型:从 Function Calling 到多模型协作的中科热备底层逻辑
服务器·重构·gitlab
何以解忧,唯有..2 天前
Claude Code 常用操作总结
gitlab
GGG7662 天前
K8s1.28 全栈落地|Jenkins+GitLab+Harbor DevOps 流水线封神实战
kubernetes·gitlab·jenkins
Patrick_Wilson3 天前
为什么gitlab的MR会默认有一个merge commit
前端·git·gitlab
极小狐3 天前
极狐GitLab Duo 功能更新:扩展 MCP 工具集、支持 MR 事件触发
运维·gitlab·agent·mr·极狐gitlab·mcp·极狐gitlab duo
2501_928996223 天前
GitLab CVE-2026-19478漏洞解析:Gitaly ref攻击绕过审计与中科热备下的代码资产保护重构
重构·gitlab
秦渝兴3 天前
GitLab CI/CD 流水线实战
ci/cd·gitlab
Ningcode_cloud5 天前
什么是CICD? GitLab + Jenkins 持续集成实战部署手册
运维·ci/cd·云原生·容器·gitlab·jenkins