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

相关推荐
小安同学iter8 小时前
三台服务器,一套流水线:如何实现无缝自动化部署?
gitlab·jenkins
西部森林牧歌1 天前
Arbess从基础到高阶(14) - 使用Arbess+GitLab+SonarQube实现代码扫描完成后自动化部署
ci/cd·gitlab·sonarqube·arbess·tiklab devops
4***V2021 天前
GitLab Pages配置
git·gitlab·github
sulikey2 天前
从入门到精通:如何自己编写高质量的 .gitignore(面向工程实践)
git·gitee·编辑器·gitlab·github·gitignore·gitattributes
小晶晶京京2 天前
day62-gitlab和JenKins
运维·gitlab·jenkins
三天不学习4 天前
GitLab Docker 安装完整配置项说明
docker·容器·gitlab
一念一花一世界6 天前
Arbess从初级到进阶(9) - 使用Arbess+GitLab实现C++项目自动化部署
c++·ci/cd·gitlab·arbess
X***48966 天前
GitLab
gitlab
一世一生命6 天前
GitLab Package依赖管理:从 Dependabot 到 Renovate 的迁移实践和两者对比
gitlab
t***L2666 天前
GitLab API使用实例
运维·gitlab