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

相关推荐
Java 码农6 小时前
gitlab gitrunner springboot 多环境多分支部署 (非容器方式,使用原生linux 环境)
linux·spring boot·gitlab
Java 码农9 小时前
GitLab + GitLab Runner + Spring Cloud Alibaba 多环境多分支容器化部署方案(docker)
docker·容器·gitlab
毋若成1 天前
公司小白第一课:DACS、gitlab、AI提问词
ai·gitlab·dacs
石工记1 天前
Ubuntu 2024 Docker-Compose部署GitLab+MySQL 8.0保姆式方案
ubuntu·docker·gitlab
tzhou644526 天前
搭建Jenkins+GitLab持续集成环境
ci/cd·gitlab·jenkins
编程、小哥哥6 天前
AI之gitlab代码分析之按迭代评审
gitlab
可爱又迷人的反派角色“yang”7 天前
GitLab配置与git集成实践
linux·网络·git·docker·云计算·gitlab
LucidX7 天前
从零搭建Jenkins+GitLab持续集成环境:详细教程
ci/cd·gitlab·jenkins
m0_485614677 天前
GitLab基础管理
gitlab
不爱学习的笨蛋7 天前
ubuntu安装gitlab
linux·ubuntu·gitlab