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

相关推荐
牛马的人生4 天前
GitLab入门教程:打开DevOps全流程的大门
运维·其他·gitlab·devops
水冗水孚4 天前
Ubuntu服务器上使用docker-compose部署 gitlab(图文并茂记录)
gitlab
<花开花落>6 天前
gitlab-runner 再次实践中理解和学习
gitlab
Vahala0623-孔勇7 天前
CI/CD流水线优化:GitLab CI镜像构建加速实战
ci/cd·gitlab
Lin_Aries_04218 天前
部署 GitLab 服务器
linux·运维·服务器·docker·gitlab·github
FreeBuf_8 天前
GitLab高危漏洞可致实例崩溃(CVE-2025-10858 和 CVE-2025-8014)
gitlab
恒雨田9 天前
Jenkins安装并与GitLab集成,实现dev、qa、uat、prod多分支持续集成的详细步骤
ci/cd·gitlab·jenkins
꧁༺摩༒西༻꧂9 天前
Windows Server 2022离线搭建Gitlab
gitlab
熙客9 天前
GitLab:代码管理
gitlab
Lin_Aries_042110 天前
通过配置 GitLab 自动触发项目自动化构建与部署
运维·docker·容器·自动化·云计算·gitlab